[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:

  https://github.com/RIOT-OS/RIOT/pull/12236

-- Commit Summary --

  * Pull-down on gpio_init_af

-- File Changes --

    M cpu/stm32_common/periph/gpio.c (3)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/12236.patch
https://github.com/RIOT-OS/RIOT/pull/12236.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12236
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190915/b7323b92/attachment.htm>


More information about the notifications mailing list