Other Parts Discussed in Thread: HALCOGEN, NOWECC, TMS570LS20216
Hi,
I am using TMS570 USB stick and CCV4 for the avionics code development. I am using the code generated from the HALcogen for the initial driver code. Everything works as i expected with out ECC check enabled.
I have read the TMS570 user guide and found the below code for ECC check.
_ACTM_Enable_ECC
MRC p15,#0,r1,c9,c12,#0; Read PMNC register in privileged mode
ORR r1, r1, #0x00000010; Bit4 enable export of the events to the event bus (send
ECC error to the flash wrapper)
MCR p15,#0,r1,c9,c12,#0; Write PMNC register in privileged mode
MRC p15, #0,r1,c1,c0,#1; Read Auxiliary control register
ORR r1, r1, #0x02000000; Bit25 is ATCM ECC check enable
MCR p15, #0, r1, c1, c0, #1; Write Auxiliary control register
MRC p15, #0,r1,c1,c0,#1; Read Auxiliary control register
ORR r1, r1, #0x00000001; Bit0 is ATCM external error into CPU enable
MCR p15, #0, r1, c1, c0, #1; Write Auxiliary control register
MOV PC, lr
After i build the code with the ECC check enabled, i used the nowECC to generate the ECC hex file.
The generated hex file i downloaded to the target through the now Flash. Then i launched the CCS debugger
and Connetced to the target. I am able to see the ECC memory with the expected values of ECC.
After this i loaded the actual program to test the ECC functinality. I found that control is stopped in
prefech ISR. This might be because of mismatch between ECC stored and ECC calcuated. In memory view, i found that
ECC memory is filled with all F's. The memory is overwritten by default value after the loading the program.
1) How to test ECC functinality using CCS ? How to avoid the overwritten of Flash ECC memory in CCS ?
Two more questions apart from the above issue.
2) Is there anything else i should add in my code for proper working of ECC ?
3) How to enable the ECC check for RAM ? And what is the thoery behind working of ECC for RAM ?