[riot-commits] [RIOT-OS/RIOT] 73c916: cpu/stm32: Fix gpio_init() / gpio_int_af()

Alexandre Abadie noreply at github.com
Wed Jul 15 21:14:59 CEST 2020


  Branch: refs/heads/master
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 73c91615175b4751214f665fec74089ad0805ac8
      https://github.com/RIOT-OS/RIOT/commit/73c91615175b4751214f665fec74089ad0805ac8
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-15 (Wed, 15 Jul 2020)

  Changed paths:
    M cpu/stm32/periph/gpio_all.c
    M cpu/stm32/periph/gpio_f1.c

  Log Message:
  -----------
  cpu/stm32: Fix gpio_init() / gpio_int_af()

- Do not set an intermediate mode, prepare correct mode settings in a temporary
  variable
- Consistently enabled the GPIO periph in gpio_init_af()
    - Previously, STM32 F1 did not require a separate call to gpio_init() prior
      to a call of gpio_init_af(), but other STM32 families did
    - Now, gpio_init_af() can be used without gpio_init() consistently
- STM32 F1: Do not touch ODR for non input pins
    - For input pins, this enables / disabled pull up resistors. For outputs,
      this register should remain untouched (according to API doc)


  Commit: aec9eb7f6a634ead6db873aba1803067133b23ef
      https://github.com/RIOT-OS/RIOT/commit/aec9eb7f6a634ead6db873aba1803067133b23ef
  Author: Marian Buschsieweke <marian.buschsieweke at ovgu.de>
  Date:   2020-07-15 (Wed, 15 Jul 2020)

  Changed paths:
    M cpu/stm32/periph/uart.c

  Log Message:
  -----------
  cpu/stm32: Fix uart_init()

- Make use of the fact that gpio_init_af() does not need prior call to
  gpio_init() for all STM32 families anymore and drop call to gpio_init()
- Initialize the UART periph first, before initializing the pins
    - While uninitialized, the UART periph will send signal LOW to TXD. This
      results in a start bit being picked up by the other side.
    - Instead, we do not connect the UART periph to the pins until it is
      initialized, so that the TXD level will already be HIGH when the pins
      are attached.
    - This results in no more garbage being send during initialization


  Commit: 7fd25f21c9b85df9ee754e17a5103341989c424f
      https://github.com/RIOT-OS/RIOT/commit/7fd25f21c9b85df9ee754e17a5103341989c424f
  Author: Alexandre Abadie <alexandre.abadie at inria.fr>
  Date:   2020-07-15 (Wed, 15 Jul 2020)

  Changed paths:
    M cpu/stm32/periph/gpio_all.c
    M cpu/stm32/periph/gpio_f1.c
    M cpu/stm32/periph/uart.c

  Log Message:
  -----------
  Merge pull request #14426 from maribu/stm32f4_uart_init

cpu/stm32: Fix garbage on UART init


Compare: https://github.com/RIOT-OS/RIOT/compare/7150c7ae10d9...7fd25f21c9b8


More information about the commits mailing list