R
R
RW
RW
RW
Peripheral
Frame
Peripheral
Frame
RAM
Flash (3MB)
0x0000_0000
0x002F_FFFF
0x0800_0000
0x0843_FFFF
Region 0
Full Read
Write of
Peripheral
Frame
Region 1
Write only
First 10 KB
Region 2
Write only
Last 10 KB
0xF07F_FFFF
0xFFFF_FFFF
Region 1
Write:
0x0800_0000
0x0800_2800
Region 2
Write:
0x0843_D7FF
0x0843_FFFF
How to Use NMPU
467
SPNU563A – March 2018
Copyright © 2018, Texas Instruments Incorporated
System Memory Protection Unit (NMPU)
Figure 11-3. Example of DMA 3 MPU Region Set Up
This will allow DMA to be able to create transfer from any location within peripheral frame to a specific
allocation in system RAM to avoid corrupting the system memory RAM reserved for other tasks.
Following is the recommended generic software sequence to setup the MPU regions:
1. Make sure the bus master is idle and not sending any transaction. Please follow the bus master TRM
on how to idle the bus interface. it will be different from one bus master to another.
2. Write 0xA to unlocked field LOCK of MPULOCK register (
) to allow update to NMPU
control registers.
3. Enable MPU error pulse event to ESM by writing 0xA to field ERRENA field of MPUCTRL2 register
). Program this step if and only if the bus master has no capability to capture the MPU
transaction error from NMPU. If bus master has the ability to report transaction error, disable the
ERRENA. Software will rely on bus master to trigger error event causing interrupt to the CPU.
4. Read MPUTYPE register (
) to identify how many regions are implemented for this bus
master in a particular device.
5. Program the MPUREGNUM register (
) to indicate that MPU region number to write
starting address, size, permission, and so on.
6. Program the MPUREGBASE register (
) to set the base address for the particular MPU
region number that was set in step 5.