How to Use NMPU
466
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
System Memory Protection Unit (NMPU)
11.2.3.2 Lock Feature for NMPU
Lock feature prevents unintentional updates to NMPU registers. Writes to registers other than
MPUERRSTAT is possible only when NMPU is unlocked by writing 0xAh to LOCK key bits of MPULOCK
register. On reset, these bits are set to 0x5h and hence the NMPU registers are in the locked state. All
NMPU registers are writable only in privilege mode. There is no built in protection based on master ID. It is
user responsibility to ensure that only a single valid privilege master updates the MPU registers.
11.2.3.3 Multibit Keys for Feature Enable/Disable
4-bit key is used to protect critical function enters enable or disable state from soft error. These key are
updated only if the write data is 0x5h or 0xAh. Register write is ignored for all other write values. A built in
correction logic detects single bit soft error on this field and corrects the value in the next cycle.
Functionality and register read data remain the same during the correction cycle.
11.3 How to Use NMPU
11.3.1 How to Use NMPU in Functional Mode
The NMPU is used to configure the bus master MPU region in such a way that the bus master does not
interfere with the memory region reserved for other tasks and not belonging to the system partitioning for
the IP.
Once user determines the architectural memory partitioning of the IP bus masters on memory system
frame according to their application, user should configure the corresponding MPU region for each bus
master accordingly.
shows the example recommended memory setting for a bus master in the device, for
example, DMA.
Assume the DMA bus master has 3 MPU regions.
The lowest priority MPU region1 is programmed to enable full read and write to peripheral memory frame.
MPU region 2 is programmed to allow read and write to a lower 10KB portion of the system RAM starting
from 0x0800_0000.
MPU region 3 is programmed to allow read and write to the upper 10KB away from 0x0843_FFFF portion
of the system RAM.
Any access in between 0x0800_2800 and 0x0843_D7FF is a read only mode for DMA.
With this configuration, DMA can have read or write access to the entire peripheral frame and only able to
write to upper or lower 10KB of the system RAM.
The rest of the system RAM is reserved for other tasks in which the DMA should not interfere with.