Skip to content

Commit 557d1a3

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. REGION_IO_ATTR configures the MPU region to device-memory with RW access, which is also used for the PERIPH region. To avoid complicating things unnecessarily, we use this type instead of defining a new device-RO. 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 <[email protected]>
1 parent f1c2ce4 commit 557d1a3

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, REGION_IO_ATTR(REGION_512B)),
3232

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

0 commit comments

Comments
 (0)