47#define ADDR_APB1 (0x40000000U)
48#define ADDR_SPI3 (ADDR_APB1 + 0x3C00)
49#define ADDR_SPI2 (ADDR_APB1 + 0x3800)
50#define ADDR_RTC (ADDR_APB1 + 0x2800)
51#define ADDR_PWR (ADDR_APB1 + 0x7000)
52#define ADDR_I2C3 (ADDR_APB1 + 0x5C00)
53#define ADDR_I2C2 (ADDR_APB1 + 0x5800)
54#define ADDR_I2C1 (ADDR_APB1 + 0x5400)
55#define ADDR_USART2 (ADDR_APB1 + 0x4400)
58#define ADDR_APB2 (0x40010000U)
59#define ADDR_EXTI (ADDR_APB2 + 0x3C00)
60#define ADDR_SYSCFG (ADDR_APB2 + 0x3800)
61#define ADDR_SPI4 (ADDR_APB2 + 0x3400)
62#define ADDR_SPI1 (ADDR_APB2 + 0x3000)
63#define ADDR_USART6 (ADDR_APB2 + 0x1400)
64#define ADDR_USART1 (ADDR_APB2 + 0x1000)
67#define ADDR_AHB1 (0x40020000U)
68#define ADDR_GPIOA (ADDR_AHB1)
69#define ADDR_GPIOB (ADDR_AHB1 + 0x0400)
70#define ADDR_GPIOC (ADDR_AHB1 + 0x0800)
71#define ADDR_GPIOD (ADDR_AHB1 + 0x0C00)
72#define ADDR_GPIOE (ADDR_AHB1 + 0x1000)
73#define ADDR_GPIOH (ADDR_AHB1 + 0x1C00)
74#define ADDR_RCC (ADDR_AHB1 + 0x3800)
77#define ADDR_AHB2 (0x50000000U)
123 uint32_t RESERVED0[2];
126 uint32_t RESERVED1[2];
129 uint32_t RESERVED2[2];
132 uint32_t RESERVED3[2];
135 uint32_t RESERVED4[2];
138 uint32_t RESERVED5[2];
141 uint32_t RESERVED6[2];
734#define RCC ((RCC_REGDEF_ts*)ADDR_RCC)
735#define EXTI ((EXTI_REGDEF_ts*)ADDR_EXTI)
736#define SYSCFG ((SYSCFG_REGDEF_ts*)ADDR_SYSCFG)
737#define RTC ((RTC_REGDEF_ts*)ADDR_RTC)
738#define PWR ((PWR_REGDEF_ts*)ADDR_PWR)
739#define GPIOA ((GPIO_REGDEF_ts*)ADDR_GPIOA)
740#define GPIOB ((GPIO_REGDEF_ts*)ADDR_GPIOB)
741#define GPIOC ((GPIO_REGDEF_ts*)ADDR_GPIOC)
742#define GPIOD ((GPIO_REGDEF_ts*)ADDR_GPIOD)
743#define GPIOE ((GPIO_REGDEF_ts*)ADDR_GPIOE)
744#define GPIOH ((GPIO_REGDEF_ts*)ADDR_GPIOH)
745#define I2C1 ((I2C_REGDEF_ts*)ADDR_I2C1)
746#define I2C2 ((I2C_REGDEF_ts*)ADDR_I2C2)
747#define I2C3 ((I2C_REGDEF_ts*)ADDR_I2C3)
748#define SPI1 ((SPI_REGDEF_ts*)ADDR_SPI1)
749#define SPI2 ((SPI_REGDEF_ts*)ADDR_SPI2)
750#define SPI3 ((SPI_REGDEF_ts*)ADDR_SPI3)
751#define SPI4 ((SPI_REGDEF_ts*)ADDR_SPI4)
752#define USART1 ((USART_REGDEF_ts*)ADDR_USART1)
753#define USART2 ((USART_REGDEF_ts*)ADDR_USART2)
754#define USART6 ((USART_REGDEF_ts*)ADDR_USART6)
891#define GPIOA_CLK_EN() (RCC->RCC_AHB1ENR |= 0b1 << 0)
892#define GPIOB_CLK_EN() (RCC->RCC_AHB1ENR |= 0b1 << 1)
893#define GPIOC_CLK_EN() (RCC->RCC_AHB1ENR |= 0b1 << 2)
894#define GPIOD_CLK_EN() (RCC->RCC_AHB1ENR |= 0b1 << 3)
895#define GPIOE_CLK_EN() (RCC->RCC_AHB1ENR |= 0b1 << 4)
896#define GPIOH_CLK_EN() (RCC->RCC_AHB1ENR |= 0b1 << 7)
898#define GPIOA_CLK_DIS() (RCC->RCC_AHB1ENR |= ~(0b1 << 0))
899#define GPIOB_CLK_DIS() (RCC->RCC_AHB1ENR |= ~(0b1 << 1))
900#define GPIOC_CLK_DIS() (RCC->RCC_AHB1ENR |= ~(0b1 << 2))
901#define GPIOD_CLK_DIS() (RCC->RCC_AHB1ENR |= ~(0b1 << 3))
902#define GPIOE_CLK_DIS() (RCC->RCC_AHB1ENR |= ~(0b1 << 4))
903#define GPIOH_CLK_DIS() (RCC->RCC_AHB1ENR |= ~(0b1 << 7))
RCC_AHB1RSTR_te
RCC_AHB1RSTR register bit positions.
I2C_CCR_te
I2C_CCR register bit positions.
I2C_CR2_te
I2C_CR2 register bit positions.
I2C_CR1_te
I2C_CR1 register bit positions.
USART_SR_te
USART_SR register bit positions.
RTC_PRER_te
RTC_PRER register bit positions.
APB1ENR_te
APB1ENR register bit positions (legacy, prefer RCC_APB1ENR_te).
RCC_CSR_te
RCC_CSR register bit positions.
USART_BRR_te
USART_BRR register bit positions.
SPI_CR1_te
SPI_CR1 register bit positions.
SPI_CR2_te
SPI_CR2 register bit positions.
RTC_CR_te
RTC_CR register bit positions.
I2C_SR2_te
I2C_SR2 register bit positions.
RCC_AHB1ENR_te
RCC_AHB1ENR register bit positions.
USART_CR2_te
USART_CR2 register bit positions.
I2C_OAR1_te
I2C_OAR1 register bit positions.
RCC_BDCR_te
RCC_BDCR register bit positions.
PWR_CR_te
PWR_CR register bit positions.
USART_CR3_te
USART_CR3 register bit positions.
RCC_APB2ENR_te
RCC_APB2ENR register bit positions.
RCC_CR_te
RCC_CR register bit positions.
RCC_CFGR_te
RCC_CFGR register bit positions.
RTC_ISR_te
RTC_ISR register bit positions.
USART_CR1_te
USART_CR1 register bit positions.
RCC_APB2RSTR_te
RCC_APB2RSTR register bit positions.
RTC_TR_te
RTC_TR register bit positions (all fields BCD-encoded).
RCC_APB1ENR_te
RCC_APB1ENR register bit positions.
RCC_APB1RSTR_te
RCC_APB1RSTR register bit positions.
I2C_SR1_te
I2C_SR1 register bit positions.
RTC_DR_te
RTC_DR register bit positions (all fields BCD-encoded).
SPI_SR_te
SPI_SR register bit positions.
PORT_CODES_ts
SYSCFG port codes for EXTICRx routing.
EXTI_LINES_te
EXTI line numbers.
IRQn_te
IRQ numbers in the STM32F401RE Cortex-M4 vector table.
@ TIM1_TRG_COM_TIM11_IRQn
EXTI (External Interrupt/Event Controller) peripheral register map.
uint32_t volatile EXTI_RTSR
uint32_t volatile EXTI_SWIER
uint32_t volatile EXTI_EMR
uint32_t volatile EXTI_FTSR
uint32_t volatile EXTI_PR
uint32_t volatile EXTI_IMR
GPIO peripheral register map.
uint32_t volatile GPIO_IDR
uint32_t volatile GPIO_BSRR
uint32_t volatile GPIO_LCKR
uint32_t volatile GPIO_ODR
uint32_t volatile GPIO_PUPDR
uint32_t volatile GPIO_OTYPER
uint32_t volatile GPIO_AFR[2]
uint32_t volatile GPIO_MODER
uint32_t volatile GPIO_OSPEEDR
I2C peripheral register map.
uint32_t volatile I2C_OAR1
uint32_t volatile I2C_SR1
uint32_t volatile I2C_CCR
uint32_t volatile I2C_CR2
uint32_t volatile I2C_SR2
uint32_t volatile I2C_TRISE
uint32_t volatile I2C_FLTR
uint32_t volatile I2C_CR1
uint32_t volatile I2C_OAR2
PWR (Power Control) peripheral register map.
uint32_t volatile PWR_CSR
RCC (Reset and Clock Control) peripheral register map.
uint32_t volatile RCC_AHB2RSTR
uint32_t volatile RCC_AHB2LPENR
uint32_t volatile RCC_BDCR
uint32_t volatile RCC_CFGR
uint32_t volatile RCC_DCKCFGR
uint32_t volatile RCC_APB2LPENR
uint32_t volatile RCC_CSR
uint32_t volatile RCC_APB1LPENR
uint32_t volatile RCC_APB1RSTR
uint32_t volatile RCC_PLLCFGR
uint32_t volatile RCC_AHB1ENR
uint32_t volatile RCC_AHB1RSTR
uint32_t volatile RCC_APB1ENR
uint32_t volatile RCC_APB2ENR
uint32_t volatile RCC_AHB2ENR
uint32_t volatile RCC_CIR
uint32_t volatile RCC_AHB1LPENR
uint32_t volatile RCC_APB2RSTR
uint32_t volatile RCC_PLLI2SCFGR
uint32_t volatile RCC_SSCFGR
RTC peripheral register map.
uint32_t volatile RTC_ALRMASSR
uint32_t volatile RTC_ALRMBSSR
uint32_t volatile RTC_TAFCR
uint32_t volatile RTC_TSTR
uint32_t volatile RTC_WPR
uint32_t volatile RTC_BKPxR[20]
uint32_t volatile RTC_ALRMAR
uint32_t volatile RTC_ALRMBR
uint32_t volatile RTC_SSR
uint32_t volatile RTC_WUTR
uint32_t volatile RTC_CALIBR
uint32_t volatile RTC_ISR
uint32_t volatile RTC_PRER
uint32_t volatile RTC_TSSSR
uint32_t volatile RTC_CALR
SPI peripheral register map.
uint32_t volatile SPI_CRCPR
uint32_t volatile SPI_I2SPR
uint32_t volatile SPI_I2SCFGR
uint32_t volatile SPI_RXCRCR
uint32_t volatile SPI_CR2
uint32_t volatile SPI_TXCRCR
uint32_t volatile SPI_CR1
SYSCFG (System Configuration Controller) peripheral register map.
uint32_t volatile SYSCFG_EXTICR3
uint32_t volatile SYSCFG_CMPCR
uint32_t volatile SYSCFG_EXTICR1
uint32_t volatile SYSCFG_PMC
uint32_t volatile SYSCFG_MEMRMP
uint32_t volatile SYSCFG_EXTICR2
uint32_t volatile SYSCFG_EXTICR4
USART peripheral register map.
uint32_t volatile USART_GTPR
uint32_t volatile USART_BRR
uint32_t volatile USART_DR
uint32_t volatile USART_CR3
uint32_t volatile USART_CR1
uint32_t volatile USART_SR
uint32_t volatile USART_CR2