EasyManuals Logo

ST STM32F31xx User Manual

ST STM32F31xx
584 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #16 background imageLoading...
Page #16 background image
STM32F30xx Standard Peripheral Library
UM1581
16/584
DocID023800 Rev 1
Variable types
Specific variable types are already defined with a fixed type and size. These types are
defined in the file stm32f30x.h
typedef enum {
RESET = 0,
SET = !RESET
}
FlagStatus, ITStatus;
typedef enum {
DISABLE = 0,
ENABLE = !DISABLE
}
FunctionalState;
typedef enum {
ERROR = 0,
SUCCESS = !ERROR
}
ErrorStatus;
Peripherals
Pointers to peripherals are used to access the peripheral control registers. They point to
data structures that represent the mapping of the peripheral control registers.
Peripheral registers structure
stm32f30x.h contains the definition of all peripheral register structures. The example below
illustrates the SPI register structure declaration:
"/*------------------ Serial Peripheral Interface ---------------*/
typedef struct
{
__IO uint16_t CR1; /*!< SPI control register 1 (not used in
I2S mode), Address offset: 0x00 */
uint16_t RESERVED0;/*!< Reserved, 0x02
*/
__IO uint16_t CR2; /*!< SPI control register 2, Address
offset: 0x04 */
uint16_t RESERVED1;/*!< Reserved, 0x06
*/
__IO uint16_t SR; /*!< SPI status register, Address offset:
0x08 */
uint16_t RESERVED2;/*!< Reserved, 0x0A
*/
__IO uint16_t DR; /*!< SPI data register,Address offset:
0x0C */
uint16_t RESERVED3;/*!< Reserved, 0x0E
*/
__IO uint16_t CRCPR; /*!< SPI CRC polynomial register (not
used in I2S mode), Address offset: 0x10 */
uint16_t RESERVED4;/*!< Reserved, 0x12
*/
__IO uint16_t RXCRCR; /*!< SPI RX CRC register (not used in I2S
mode),Address offset: 0x14 */
uint16_t RESERVED5;/*!< Reserved, 0x16 */

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F31xx and is the answer not in the manual?

ST STM32F31xx Specifications

General IconGeneral
BrandST
ModelSTM32F31xx
CategoryMicrocontrollers
LanguageEnglish

Related product manuals