mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
get GPIO and USART ports working.
The STM32F3DISCOVERY board would crash when setting GPIOA Pin_13 or Pin_14 to analog mode so they are excluded in the gpio initialisation. The USART GPIO configuration did not work when using the F10x code. The USART status and DMA registers are different too.
This commit is contained in:
parent
2cc3a50c01
commit
8d9ce86a5a
9 changed files with 3720 additions and 3 deletions
|
@ -110,9 +110,15 @@ void systemInit(bool overclock)
|
|||
RCC_ClearFlag();
|
||||
|
||||
// Make all GPIO in by default to save power and reduce noise
|
||||
gpio.pin = Pin_All;
|
||||
gpio.mode = Mode_AIN;
|
||||
gpio.pin = Pin_All;
|
||||
#ifdef STM32F3DISCOVERY
|
||||
gpio.pin = Pin_All & ~(Pin_13|Pin_14);
|
||||
gpioInit(GPIOA, &gpio);
|
||||
gpio.pin = Pin_All;
|
||||
#else
|
||||
gpioInit(GPIOA, &gpio);
|
||||
#endif
|
||||
gpioInit(GPIOB, &gpio);
|
||||
gpioInit(GPIOC, &gpio);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue