Other Parts Discussed in Thread: HALCOGEN
Hello there,
I'm quite a bit of trouble making the SRAM ECC to work, and this since a while.
We’re using the TI MCU TMS570LS3137 with an ARM CORTEX-R4F core and having constant problem with MCU RAM ECC even bank and/or odd bank parity-check enabled before the C main() is called. In the following code, please note that if only bit25 is enabled for the Flash ROM ECC check, no problem at all. The problem is when Bit26 and/or Bit27 for RAM ECC check were enabled.
; Enable ACTM ECC (spnu499c TRM para. 2.2.3.2) ; DDI0363G TRM para. 4.3.16: c1, Auxiliary control register ACTLR ; Configure to enable ECC check on Flash and SRAM MRC p15,#0,r1,c1,c0, #1 ; Read Auxiliary control register ORR r1, r1, #0x0E000000 ; Bit25 is ATCM ECC check enable (main flash array) ; Bit26 is B0TCM ECC check enable (SRAM even bank) ; Bit27 is B1TCM ECC check enable (SRAM odd bank) MCR p15,#0,r1,c1,c0, #1 ; Write Auxiliary control register nop nop nop
The following list provides a summarized description of the encountered problem and we’re seeking your helps:
- Using binary code generated by IAR linker with the TI supplied startup code in tms570ls3137_cstartup.s.
- When using Debugger to start the code, problem has never happened.
- With the same binary code in the MCU Flash, disconnect the debugger and recycle the power will enter the Abort_Handler() exception every time, which signals "illegal memory read/write access".
- By “Attach to the running program” then stop the execution, the following is shown:
- Data fault address DFAR and status DFSR registers display different values on each occurrence, so I cannot get a hold on the origin of the trouble.
- When stepping code before reaching the main(), I came across the following behavior:
- When __iar_data_init3 was called, I stepped into a deeper level and have discovered that when the green line was executed within __iar_zero_init3, the Abort_Handler() exception is entered, which signals that was a RAM parity error encountered:
To summarize, the following is the complete calling sequence:
tms570ls3137_cstartup.s (SRAM ECC check enabled here), branch to __cmain, calls __low_level_init, calls __iar_data_init3, calls __iar_zero_init3, executes first call to STR.W instruction, no issue second call to STR.W instruction, no issue third call to STR.W instruction, illegal memory read or write bring up Abort_Handler() exception
Could you provide hints as on what I should look for to prevent the RAM ECC check exception?
Thank you!