STM32F411: Enable all GPIO-clocks in SystemInit()
Serial pins are also there.
This commit is contained in:
parent
fd81ea9c60
commit
01be683b6c
|
|
@ -209,6 +209,13 @@ void SystemInit(void)
|
|||
/* Configure the System clock source, PLL Multiplier and Divider factors,
|
||||
AHB/APBx prescalers and Flash settings */
|
||||
SetSysClock();
|
||||
|
||||
// Enable power and clocking for all GPIO
|
||||
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | \
|
||||
RCC_AHB1ENR_GPIOBEN | \
|
||||
RCC_AHB1ENR_GPIOCEN | \
|
||||
RCC_AHB1ENR_GPIODEN | \
|
||||
RCC_AHB1ENR_GPIOHEN;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
void serial_init()
|
||||
{
|
||||
// Enable TX/RX clock (GPIOA)
|
||||
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN;
|
||||
// Enable USART2 clock
|
||||
RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue