feat(mpu): Cortex-R4F MPU (CP15) configuration driver #126
Labels
No labels
Category
App
Category
Documentation
Category
Firmware
Category
Hardware
Category
Qms
PR_Size
L
PR_Size
M
PR_Size
S
PR_Size
XL
PR_Size
XS
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Priority
Very Low Priority
Size
Epic
Size
Feature
Size
Task
Status
Blocked
Status
Draft
Status
Needs-review
Team
Board
Team
Dev
Team
Management
Type
Bug
Type
Capa
Type
Improvement
Type
New-feature
Type
Regulatory
Type
Usability
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
opendutchsolutions.public/hal_awr6843#126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found bringing up a downstream consumer project (
awr6843_mss_barebones_example) on real AWR6843AOP hardware.hal_soc_init()(hal/mss/soc/hal_soc.c) does not configure the MPU at all -- it only does BSS clock bring-up and the secure firewall. This project's own startup code disables the MPU entirely and leaves it that way. Confirmed on real hardware, via a controlled bisection, that this is NOT equivalent to an explicit MPU region table for peripheral-register sequences that depend on write ordering:hal_pinmux_set_pin_function()'s kick-unlock/write/kick-lock sequence (see issue #122/PR #123) silently failed to reach the pad with the MPU left disabled, and started working once peripheral space was explicitly marked Strongly-Ordered via an MPU region -- a plain "MPU disabled = unrestricted access" default apparently doesn't guarantee write ordering the way an explicit Strongly-Ordered region does.Add a new
hal_mpudriver (ENABLE_MPU_MODULE) withhal_mpu_config(): disables the MPU, programs a 12-region table (background/TCMA/TCMB/ext-flash/QSPI/peripheral-space/mailbox/HSRAM/EDMA/L3/ADCBUF/SW-buffer -- the peripheral-space region, covering both MSS_IOMUX and MSS_GIO, is Strongly-Ordered, the region that turned out to matter), then re-enables it. Not called automatically byhal_soc_init()-- a consumer calls it explicitly, beforehal_soc_init(), if it touches peripherals with write-ordering-sensitive register sequences (which is most of them).Values/order are a direct transliteration of a hardware-confirmed sibling project's own MPU bring-up (
AWR6xxx_Toolchain'sUniversal_hal,soc_iwr68xx.c'smpu_config()) -- not independently re-derived from a TRM section (none was available to this project covering MPU region layout for this device).Note on testability: this is CPU-core state (CP15 coprocessor registers), not a memory-mapped peripheral -- unlike every other driver in this HAL,
hal_mpu_config()'s actual register writes cannot be exercised by a host unit test (no x86 equivalent tomcr/mrc). The region table itself is exposed as plain data (hal_mpu_region_table) and is what's host-tested.