1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/nucleo-f103rb
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
..
include boards/stm32: replace GPIO_UNDEF with SPI_CS_UNDEF 2022-01-06 12:34:09 +01:00
doc.txt boards/nucleo64: Add pinout diagrams from UM1724 2023-03-17 15:16:31 +01:00
Kconfig boards/nucleo-*: put Kconfig HSE/LSE clock config in common 2021-01-20 09:16:46 +01:00
Makefile boards/nucleo-f103rb: rename to marketing name 2018-05-22 21:52:41 +02:00
Makefile.dep boards: drop LED init 2022-02-18 14:35:43 +01:00
Makefile.features boards/stm32*: adapt for new stm32 cpu organization 2020-05-20 13:39:10 +02:00
Makefile.include cpu/stm32/f1: prevent corrupting AFIO->MAPR 2023-11-20 20:28:52 +01:00