mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-14 03:50:02 +03:00
Working - except when exiting from bootloader
Fixes the `Waiting for Data` problem in configurator when: - Clicking on `Save and Reboot` button - Clicking on `Flash Firmware` button When the system reboots after programming the new firmware it still needs a connect/disconnect cycle to work normal. This cannot be solved since the bootloader is a fixed program in ROM. Fix is for F1 targets and only tested on naze boards.
This commit is contained in:
parent
efc31f9d57
commit
c40db74e61
2 changed files with 11 additions and 6 deletions
|
@ -151,11 +151,19 @@ void systemInit(void)
|
|||
cachedRccCsrValue = RCC->CSR;
|
||||
RCC_ClearFlag();
|
||||
|
||||
|
||||
enableGPIOPowerUsageAndNoiseReductions();
|
||||
|
||||
|
||||
#ifdef STM32F10X
|
||||
// Set USART1 TX (PA9) to output and high state to prevent a rs232 break condition on reset.
|
||||
// See issue https://github.com/cleanflight/cleanflight/issues/1433
|
||||
gpio_config_t gpio;
|
||||
|
||||
gpio.mode = Mode_Out_PP;
|
||||
gpio.speed = Speed_2MHz;
|
||||
gpio.pin = Pin_9;
|
||||
digitalHi(GPIOA, gpio.pin);
|
||||
gpioInit(GPIOA, &gpio);
|
||||
|
||||
// Turn off JTAG port 'cause we're using the GPIO for leds
|
||||
#define AFIO_MAPR_SWJ_CFG_NO_JTAG_SW (0x2 << 24)
|
||||
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_NO_JTAG_SW;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue