1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/boards/common/blxxxpill
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
..
dist boards/blxxxpill: add support for stm32duino bootloader and for generic St-Link V2. 2020-05-04 19:36:15 -07:00
doc boards/common/blxxxpill: Update pinout 2023-02-28 08:35:17 +01:00
include cpu/stm32/f1: prevent corrupting AFIO->MAPR 2023-11-20 20:28:52 +01:00
doc.txt boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
Kconfig boards/{bluepill*,blackpill*}: rename and improve doc 2023-01-02 16:23:10 +01:00
Makefile boards: Split off 128KiB version of bl*pill 2019-09-29 16:42:44 +02:00
Makefile.dep boards: Split off 128KiB version of bl*pill 2019-09-29 16:42:44 +02:00
Makefile.features boards/common/blxxxpill: enable riotboot feature 2022-11-30 19:28:14 +01:00
Makefile.include boards: make DFU_USB_ID and DFU_USE_DFUSE overridable 2022-11-30 19:28:14 +01:00