mirror of
https://github.com/apache/nuttx.git
synced 2026-10-08 06:45:19 +00:00
The OTP, read-only (UID, flash size, package) and high-cycle data (EDATA) flash areas only accept 16/32-bit accesses and return a bus error otherwise (RM0481 Table 77). The manual requires the MPU to disable local cacheability for them (RM0481 7.3.2); with the ICACHE enabled and no such region, reading them raises a precise bus error. Until now this was worked around piecemeal: the driver disabled the ICACHE around stm32_get_uniqueid() and the OTP and EDATA word reads, and nucleo-h563zi mapped the 4 KB OTP/RO area non-cacheable in its board code. Other reads, for example stm32_otp_read() or an application reading the OTP on another board, still raised a precise bus error when the ICACHE was enabled. Map 0x08fff000-0x09017fff, which covers the three contiguous areas, as Normal non-cacheable and execute-never with a single MPU region before the ICACHE is enabled. STM32_ICACHE now selects ARM_MPU so that stm32_mpuinitialize() has reset and enabled the MPU by then. Remove the nucleo-h563zi OTP region in the same commit: the Armv8-M MPU faults on an address that matches more than one region, so keeping both would make OTP and UID reads fault on that board. Assisted-by: Claude:claude-sonnet-5-5 Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ricardo Maurizio Paul <ricardopaul@geotab.com> |
||
|---|---|---|
| .. | ||
| arm | ||
| arm64 | ||
| avr | ||
| dummy | ||
| hc/m9s12 | ||
| mips | ||
| misoc/lm32/misoc | ||
| or1k/mor1kx/or1k | ||
| renesas | ||
| risc-v | ||
| sim/sim/sim | ||
| sparc | ||
| tricore | ||
| x86/qemu/qemu-i486 | ||
| x86_64/qemu/qemu-intel64 | ||
| xtensa | ||
| z16/z16f/z16f2800100zcog | ||
| z80 | ||
| .gitignore | ||
| Board.mk | ||
| boardctl.c | ||
| CMakeLists.txt | ||
| dummy.c | ||
| Kconfig | ||
| Makefile | ||