mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[stm32f4_spektrum] Fixes the additional glitch pulse.
If you set the alternate function before setting the pin to input AF. The GPIO will pull down the line down very briefly. This will cause an additional pulse to be detected by a spektrum satellite if it is being reconfigured as a UART RX after sending bind mode pulses. closes #1090 and fixes #780
This commit is contained in:
committed by
Felix Ruess
parent
637da50053
commit
05b933f768
@@ -153,8 +153,8 @@ void gpio_setup_input_pulldown(uint32_t port, uint16_t gpios)
|
||||
void gpio_setup_pin_af(uint32_t port, uint16_t pin, uint8_t af, bool_t is_output __attribute__((unused)))
|
||||
{
|
||||
gpio_enable_clock(port);
|
||||
gpio_mode_setup(port, GPIO_MODE_AF, GPIO_PUPD_NONE, pin);
|
||||
gpio_set_af(port, af, pin);
|
||||
gpio_mode_setup(port, GPIO_MODE_AF, GPIO_PUPD_NONE, pin);
|
||||
}
|
||||
|
||||
void gpio_setup_pin_analog(uint32_t port, uint16_t pin)
|
||||
|
||||
Reference in New Issue
Block a user