This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
do you have advice about how to add L2RAMW ECC to the linker file for the TMS570LC43x?
the address range 0x08400000 - 0x08480000 appears to be invalid in the Lauterbach memory dump. And I'm getting a dataEntry interrupt at the last line of this code spinet. spnu540 seems to say that Data ECC in SRAM is mandatory, so why is the ECC range of L2RAMW invalid?
// Clear any previous diagnostic errors status bits [22,21,20,19,12,11,10, 4] - required before trigger
BIT_SET(L2RAM_REG->RAMERRSTATUS, L2RAM_RAMERRSTATUS_CLRALL);
sramEccTestBuff[2] = 0U;
eccB1 = &sramEccTestBuff[2];
eccB1_ECC = eccB1 + (0x00400000u/sizeof(uint64));
/* Write test vectors */
L2RAM_REG->DIAGDATAVECTOR_H = BF_GET((sramEccTestBuff[2]), 32, 32);
L2RAM_REG->DIAGDATAVECTOR_L = BF_GET((sramEccTestBuff[2]), 0, 32);
L2RAM_REG->DIAG_ECC = (uint32)(0x000000FF & ((*eccB1_ECC) ^ (uint8)L2RAM_SYN_2BIT_DATA_ECC));
Laura,
It's valid in the CPU's 'default' memory map. See
Or if there's a problem w. that link I'll paste a picture below.
Ok, but I *dont* see it in the HalCoGen default memory map under R5-MPU-PMU (second image)
So if you used HalCoGen and generated code with this default HalCoGen memory map, and enabled the MPU then an access to 0x0840_0000 would fall through to the catch all 'Region 1' which says it's not accessible, and you should get an abort.
Did you use HalCoGen? If so then it's easy to confirm. If not you can confirm your MPU settings at the time of the abort using the debugger to read out CP15 registers but this isn't the easiest thing to do...
The CPU documentation from ARM for the default memory map... when the MPU is disabled. This shouldn't give an abort on 0x0840 0000
because it's part of that 1st 0x0000 0000 to 0x3FFF FFFF block. However, I can't find any doc. saying whether this is 'privileged'. I doubt it, but can't find it. So only say 90% sure it's not this ...
Since the ecc isn't in the list, you'd fall through to the 1st region (red arrow) which is marked as inaccessible in any mode. So it'd generate an abort..
So I'm pretty sure you've got the MPU on but don't have a region assigned that allows access to the ECC...
Just enable one of the unused regions in the page below, make it open up the ECC area, and regenerate / rebuild to fix the issue.
(if you are using HalCoGen... ;)
1) if L2RAM ECC is not defined in the Memory Protection Unit (MPU) (see #2) does that mean that Data ECC (RAM1 on page 69 of spnu540) is Disabled?
2) I did not use HalCoGen, and this code has gone through several iterations already so,
a) from DDIO460D_cortex_r5_r1p2_tfm.pdf page 4-42 and lauterbach I can see that ECC for B1TCM and B0TCM and ATCM are disabled
b) from DDIO460D_cortex_r5_r1p2_tfm.pdf page 4-46 and lauterbach I can see that BTCMECC and ATCMECC in Secondary Auxiliary Control Register are enabled.
c) bellow is what I can see of the Memory Protection Unit and it looks like ram in RBAR2 does not include L2RAM ECC at 0x08400000
Where RBAR0 is in T32/pertms570lc4xx.per at
tree "MPU regions"
group c15:0x0016++0x00
saveout c15:0x26 %l 0x0
line.long 0x00 "RBAR0,Region Base Address Register 0"
Hi Laura,
Thanks for posting this. Looks like the LauterBach tool has a nice MPU visualization tool.
Laura Yindra1 said:1) if L2RAM ECC is not defined in the Memory Protection Unit (MPU)(see #2) does that mean that Data ECC (RAM1 on page 69 of spnu540) is Disabled?
No. And in fact on this device I do not believe it is possible to disable the ECC check.
What it means if you do not have the region defined in the MPU is that a CPU read or write to address 0x084xx xxxx is going to cause an abort and be blocked.
But the ECC is still active, and writing to 0x0800 0000 (the actual L2SRAM) is going to cause the ECC to be updated in the RAM wrapper by 'logic' .. likewise reads from that region will cause ECC to be checked.
What it means not having the mapping in the MPU is that you can't 'directly' look at the ECC data w. the CPU ..
Regarding the TCM memories - there are no TCM memories on the device that you are using. TCM memories are L1 memories directly connected to the CPU. On your device, you only have L1 instruction and data cache. All the flash and SRAM are cacheable and on L2 of the memory system.
On the RM4xx devices, it's the opposite, all memories are TCM, no cache. That works well up to about 200Mhz but above that we need cache for speed.
-Anthony
Is there a way to test the SRAM ECC with out enabling the 0x8400000 section of RAM and without configuring the ESM?
right now I'm always entering s_vim_init[1] which is esmHighInterrupt and entering esmGroup2Notification because (ESM->IOFFHR - 1U) is less than 64 or between 128 and 160.
does the TMS570lc4x ever correct a 1 bit L2RAM ECC error without notifying the ESM or EPC?
does the TMS570lc4x ever correct a 2 bit L2RAM ECC error without notifying the ESM or EPC?
Laura Yindra1 said:does the TMS570lc4x ever correct a 1 bit L2RAM ECC error without notifying the ESM or EPC?
L2RAMW Module Control Register (RAMCTRL) gives you some control as to whether or not certain single bit errors cause an ESM notification.
Laura Yindra1 said:does the TMS570lc4x ever correct a 2 bit L2RAM ECC error without notifying the ESM or EPC?
The ECC logic is SECDED (single bit error correction, double bit error detection).. So double bit errors are not corrected only detected.
Regarding EPC this isn't clear in the TRM and will need to be researched.
Hi Laura,
Laura Yindra1 said:does the TMS570lc4x ever correct a 1 bit L2RAM ECC error without notifying the ESM or EPC?
For 1-bit ECC detected by the CPU it will notify the EPC and eventually go to the ESM GP1.4. After the CPU detects a 1-bit ECC error it signals the EPC along with the corresponding error address. The EPC contains a CAM (content addressable memory) where the error address will be scanned through the CAM to see if there is a match. If there is no match then the 1-bit error address is stored in the CAM and it is programmable for an error to be generated to the ESM (i.e. GP1.4).
Laura Yindra1 said:does the TMS570lc4x ever correct a 2 bit L2RAM ECC error without notifying the ESM or EPC?
For 2-bit ECC detected by the CPU it will go to the ESM directly via GP2.3