1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
Kyle Burk
986488db85
cpu/stm32/f1: prevent corrupting AFIO->MAPR
The `SWJ_CFG` field of the `AFIO_MAPR` register is write only and values
read are undefined (random). Hence, using `AFIO->MAPR |= mask;` to
enable flags can corrupt the state of the `SWJ_CFG` (configure it to
an unintended value).

Two helper functions have been introduced:
- `afio_mapr_read()` reads the value, but sanitizes the `SWJ_CFG` field
  to zero
- `afio_mapr_write()` writes the given value, but applies the `SWJ_CFG`
  configured by the board before writing.

Finally, the `nucleo-f103rb` and `bluepill*`/`blackpill*` boards have
been updated to no longer specify `STM32F1_DISABLE_JTAG`, as this
is handled by the `SWJ_CFG` setting (which defaults to disabling JTAG).
2023-11-20 20:28:52 +01:00
Marian Buschsieweke
8fd8c8273f
boards/{nucleo-f103rb,b*pill}: Expose JTAG pins as GPIOs
The Nucleo-F103RB comes with an internal SWD programmer/debugger. Thus, the JTAG
pins are not going to be used for debugging / programming anyway. The pins are
exposed on the headers, so allowing them to be used as GPIOs make a lot of
sense.

The Bluepill / Blackpill boards only expose the SWD pins on the debug header,
but the JTAG pins (not also used by SWD) are exposed on the GPIO pin headers.
Hence, exposing them as regular GPIOs seems to be a reasonable choice.
2020-03-08 13:06:34 +01:00
Gaëtan Harter
636285ebe4
boards: move CPU/CPU_MODEL definition to Makefile.features
cpu/$(CPU)/Makefile.features and cpu/$(CPU)/Makefile.dep are
automatically included

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
2019-08-20 16:11:50 +02:00
2004fb2881 boards/nucleo-f103rb: rename to marketing name 2018-05-22 21:52:41 +02:00