[riot-notifications] [RIOT-OS/RIOT] cpu/stm32_common/periph/gpio: Pull-down on gpio_init_af (#12236)
notifications at github.com
Sun Sep 15 22:45:20 CEST 2019
### Contribution description
This code makes the gpio_init_af method globally pull-down the pins.
### Testing procedure
Flashed on exiting project that uses UART, I2C and SPI and checked whether everything is still working as expected and UART not functions without 47k resistor on RX.
### Issues/PRs references
The reason for this is mainly with the use of UART. After UART is being initialised, it requires the UART peer to be connected an online. If it's shut down or disconnected, the UART interrupt callback will fire continuously. There is a hardware fix for this, which consists of pulling-down the RX pin by connecting it to GND using a 47k resistor, but that should not be needed since the board itself already can do that.
However, it would probably be better to only pull down when using the RX pin and not globally. I couldn't find a way to limit this, though, as these areas of the GPIO code don't really know about individual pin functions. Suggestions are welcome.
You can view, comment on, or merge this pull request online at:
-- Commit Summary --
* Pull-down on gpio_init_af
-- File Changes --
M cpu/stm32_common/periph/gpio.c (3)
-- Patch Links --
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications