nuttx/boards/arm/stm32h5
Ricardo Maurizio Paul 3ff85acb4b arch/arm/stm32h5: map OTP, RO and EDATA flash non-cacheable.
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>
2026-10-06 16:57:31 -03:00
..
common boards/arm/stm32{l5,u5,wb,wl5,n6,h5}: use stm32 boards common 2026-07-12 09:35:56 +08:00
nucleo-h503rb boards/arm/stm32h5: add Nucleo-H503RB board support 2026-08-21 08:10:05 -03:00
nucleo-h533re boards/arm/stm32h5: add Nucleo-H533RE board support 2026-08-20 22:54:41 +02:00
nucleo-h563zi arch/arm/stm32h5: map OTP, RO and EDATA flash non-cacheable. 2026-10-06 16:57:31 -03:00
stm32h573i-dk boards/arm/stm32h5: add initial STM32H573I-DK support 2026-10-06 16:36:40 -03:00