Skip to content

Conversation

@TD-JBL
Copy link
Contributor

@TD-JBL TD-JBL commented Nov 20, 2025

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.

I introduced this region with PR #97364, both configurations work, but it is more correct with this one.

Testing: Network still initializes with this changes (reads uniqe device ID for creating the mac address per default).
Cross-check: Will mem-fault during zephyr init when commenting out this MPU_REGION_ENTRY.

Open question: Create a #define for this type? REGION_IO_ATTR_RO for example

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>
@sonarqubecloud
Copy link

Copy link
Contributor

@djiatsaf-st djiatsaf-st left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@erwango
Copy link
Member

erwango commented Nov 20, 2025

Open question: Create a #define for this type? REGION_IO_ATTR_RO for example

I guess we'll need more of those soon, that would be useful.

@JarmouniA
Copy link
Contributor

Open question: Create a #define for this type? REGION_IO_ATTR_RO for example

it's called IO for a reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants