RTDMA has a dedicated, integrated
Memory Protection Unit (MPU) which provides memory protection support and prevents
illegal accesses. Only the privileged software executing from SROOT (CPU1 LINK2) and
CPU1 LINK0/1 can access and define the RTDMA-MPU registers.
The primary function of the MPU is to
prevent the RTDMA from accessing regions that are not allocated to the corresponding
channels/regions. Key features of the MPU are:
- Associate RTDMA channels to
MPU regions.
- Demarcate Read / Write ranges
across FLASH, RAM, ROM, and other peripheral memories.
- Detect errors, block access,
and trigger an interrupt on any violations.
MPU consists of (16) 4KB regions with
individual user-configurable registers to define:
- Start and end addresses
- Read / Write permissions
- Channel Configurations
- Lock / Commit
configurations
The region of addresses is set to
SROOT only access by the SSU at boot, and these settings cannot be modified by the
user afterwards. The start and end addresses (MPUn_RD/WR_START and MPUn_RD/WR_END)
are user configurable to any range covering FLASH, RAM, ROM, and the peripherals.
MPUn_CHMASK register is used to set association of channels to MPU regions. Each
channel can be enabled in one or more MPU regions and each MPU region can be enabled
in multiple channels.
Note: MPU_LOCK and MPU_COMMIT are
global to all MPU regions and modify access of the MPU_CTRL register. MPUR_LOCK
and MPUR_COMMIT are specific to the configured MPU region and modify access of
region configuration registers.
In Figure 13-8, the
following configuration is depicted for peripheral-to-memory transfer:
- SROOT sets up RTDMA MPU
regions to
- Region 2: Start, End
addresses encompass ADCA, ADCB, ADCC - MPU region enabled for
Channel 1, Read
- Region 3: Start, End
addresses encompass ADCD, ADCE - MPU region enabled for Channel 2,
Read
- Region 4: Start, End
addresses encompass CPU1 Local RAM - MPU region enabled for Channel
1, Write
- Region 5: Start, End
addresses encompass Global RAM - MPU region enabled for Channel 2,
Write
- Channel SSU settings
- RTDMA1 Channel 1:
CPU1.APR6 LINK3 Read / Write
- RTDMA1 Channel 2:
CPU2.APR4 LINK1 Read / Write
In Figure 13-9, the
following configuration is depicted for memory-to-memory transfer:
RTDMA1:
- SROOT sets up RTDMA MPU
regions to
- Region 2: Start, End
addresses encompass a section of CPU1 Local RAM - MPU region Enabled
for RTDMA1.Channel 1 / Channel 4 - Read
- Region 3: Start, End
addresses encompass a section of CPU2 Local RAM - MPU region Enabled
for RTDMA1.Channel 1 / Channel 4 - Write
- Channel SSU settings
- RTDMA1 Channel1:
CPU1.APR6.LINK3 - READ / WRITE
- RTDMA1 Channel4:
CPU1.APR6.LINK3 - READ / WRITE
RTDMA2:
- SROOT sets up RTDMA MPU
regions to
- Region 4: Start, End
addresses encompass a section of CPU1 Local RAM - MPU region Enabled
for RTDMA2.Channel 3 - Write
- Region 5: Start, End
addresses encompass a section of CPU2 Local RAM - MPU region Enabled
for RTDMA2.Channel 3 - Read
- Channel SSU settings
- RTDMA2 Channel3:
CPU2.APR4.LINK1 - READ / WRITE