Skip to content

Commit 392c1f4

Browse files
committed
soc: st: stm32: h7rsxx: Fix MPU region for read-only id flash region
Set correct MPU memory type and size for the uniqe device id, package code and ADC VREF/TS calibration read-only flash region. (DEVICE_NON_SHAREABLE | REGION_512B | P_RO_U_NA_Msk)) is the same as REGION_IO_ATTR (used for PERIPH region) but RO instead of RW. The size is reduced to 512 bytes, because RM0477 table 28 and chapter 5.3.12 state that this read-only flash area has a size of 512 bytes. Signed-off-by: Thomas Decker <decker@jb-lighting.de>
1 parent f1c2ce4 commit 392c1f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

soc/st/stm32/stm32h7rsx/mpu_regions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ static const struct arm_mpu_region mpu_regions[] = {
2727
/* Region 3 */
2828
MPU_REGION_ENTRY("SRAM_0", CONFIG_SRAM_BASE_ADDRESS, REGION_RAM_ATTR(REGION_SRAM_SIZE)),
2929

30-
/* Region 4 - Ready only flash with unique device id */
31-
MPU_REGION_ENTRY("ID", 0x08FFF800, REGION_FLASH_ATTR(REGION_2K)),
30+
/* Region 4 - Ready only flash with unique device id, package code and VREF/TS calib*/
31+
MPU_REGION_ENTRY("ID", 0x08FFF800, {DEVICE_NON_SHAREABLE | REGION_512B | P_RO_U_NA_Msk}),
3232

3333
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(mac))
3434
#define sram_eth_node DT_NODELABEL(sram2)

0 commit comments

Comments
 (0)