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

Martine Lenders noreply at github.com
Thu Jul 16 00:37:36 CEST 2020


  Branch: refs/heads/2020.07-branch
  Home:   https://github.com/RIOT-OS/RIOT
  Commit: 17fe9f20708f1b25ec51943e99b5b98830e88b1c
      https://github.com/RIOT-OS/RIOT/commit/17fe9f20708f1b25ec51943e99b5b98830e88b1c
  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: 50643da22f25c28eebfce986b0e8dffd7b9f0c1c
      https://github.com/RIOT-OS/RIOT/commit/50643da22f25c28eebfce986b0e8dffd7b9f0c1c
  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: 92184c93155934ff0043574a5264b6c7b028e9dc
      https://github.com/RIOT-OS/RIOT/commit/92184c93155934ff0043574a5264b6c7b028e9dc
  Author: Martine Lenders <m.lenders at fu-berlin.de>
  Date:   2020-07-16 (Thu, 16 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 #14529 from maribu/backport-uart-stm32

cpu/stm32: Fix garbage on UART init [backport 2020.07] #14426


Compare: https://github.com/RIOT-OS/RIOT/compare/c6427a2c6223...92184c931559


More information about the commits mailing list