1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 15:03:53 +01:00
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
..
2023-07-11 21:22:02 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2023-01-06 22:56:28 +01:00
2023-10-19 19:01:12 +00:00
2023-10-16 12:01:15 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2022-09-26 14:10:57 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2022-09-14 15:05:25 +02:00
2023-09-20 15:55:34 +00:00
2020-07-16 15:35:25 +02:00
2022-09-14 15:05:25 +02:00
2023-06-29 22:36:35 +02:00

Platform configurations for RIOT-OS

This directory contains existing configuration and initialization files for platforms supported by RIOT-OS.