RAM Control Module
468
SPRUHE8E – October 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
Internal Memory
•
Master CPU write protection violation
If a write access is made to a dedicated or shared memory by the master CPU and CPUWRPROTx is
set to ‘1’ for that memory, it’s called a master CPU write protection violation.
If a write protection violation occur on M3, write is ignored and BUSFAULT gets generated. If the violation
occurs on C28x, write is ignored and access violation interrupt is generated, if enabled in the interrupt
enable register. A flag gets set into the cpu access violation flag register, and the memory address where
the violation happened gets latched into the cpu write access violation address register. These are
dedicated registers for each subsystem.
5.1.1.6.3 DMA Write Protection
The M3 or C28x DMA has write permission to a memory, only if that memory is dedicated to its respective
subsystem, or its respective subsystem is the master for that memory (in case of Sx memory). When write
accesses from a DMA are allowed based on the mastership,, it can be further protected by setting the
DMAWRPROTx bit of specific register to ‘1’. If write access is done by DMA to protected memory, write
protection violation occurs.
There are two types of DMA write protection violations:
•
Non-master DMA write protection violation (only applicable to Sx memories)
If a write access is made to Sx memory by the non-master DMA, it’s called a non-master write
protection violation.
If a write access is made to a dedicated or shared memory by the master DMA and DMAWRPROTx is
set to ‘1’ for that memory, it’s called a master DMA write protection violation.
•
Master DMA write protection violation
If a write access is made to a dedicated or shared memory by master DMA and DMAWRPROTx is set
to ‘1’ for that memory, it’s called a master DMA write protection violation.
If a write protection violation occurs on M3, write is ignored and the dmaerr interrupt gets generated. If a
write violation occurs on C28x, write is ignored and an access violation interrupt is generated, if enabled in
the interrupt enable register. A flag gets set into the dma access violation flag register, and the memory
address where the violation happened gets latched into the dma fetch access violation address register.
These are dedicated registers for each subsystem.
All access protections are ignored during debug accesses. Write access to protected memory will go
through when it’s done via the debugger, irrespective of the setting of Sx MSEL bits in the MSxMSEL
register and CPUWRPROTx setting. There is no protection for the M0 and M1 memories on the C28
subsystem.
5.1.1.7
Memory Error Detection, Correction and Error Handling
These devices have memory error detection and correction features to satisfy safety standards
requirements. These requirements warrant the addition of detection mechanisms for finite dangerous
failures.
All dedicateds RAMs will support error correction code (ECC) protection and the shared RAMs have parity
protection. The ECC scheme used is Single Error Correction Double Error Detection (SECDED). The
parity scheme used is even. ECC/Parity will cover the data bits stored in memory as well as address
during read and read-modify-write.
ECC/Parity calculation is done inside the RAM control module and then calculated ECC/parity is written
into the memory along with the data. ECC/Parity is computed for 16-bit data; hence, for each 32-bit data,
there will be three 7-bit ECC codes (or 3-bit parity), two of which are for data and a third one for the
address.
Though ECC/parity is calculated for 16-bit data, the controller supports ECC/parity for byte access from
masters on the M3 subsystem. In this case, the controller internally reads the complete 16-bit data from
the memory, checks the data correctness of the word present in memory, and performs a
read–modify–write operation, to store the data as a 16-bit word with ECC/parity code.