Hello,
I have been writing drivers for TMS570 in the past year and not long ago I moved from TMS570LS20216 Development kit to TMS5703137 development kit. On the new development board my software began to crash until I fount that the reason was enabling the ECC on the flash. In our software we have three separate code projects that build and load into the flash individually, but run all together. The projects are Boot software, Operational software and Constants. The Boot and the Operational software are loaded into 0 - 0x0007FFF region, taking only up to 0x17A50+ area (for now), and the constants are loaded into 0x00080000 address (occupying very small area). The problem that I'm having now (which I didn't have before with the previous development board) is that after I enable Flash ECC, the Flash adresses that are beyond the BOOT and the Operational software (over 0x17A50) change their values and most contain 0xBAD0BAD0 instead of 0xFFFFFFFF. This is shown in the two attached screen snapshots of the debugger (before Flash ECC enable and after). After a system reset the 0xFFFFFFFF values come back. Since my constants, which are located at 0x00080000, are modified by this strange pattern, my software is crashing. My flash ECC enable routine is same as generated by HALCOGEN.
.global uP_coreEnableFlashEcc_
.asmfunc
uP_coreEnableFlashEcc_:
mrc p15, #0x00, r0, c1, c0, #0x01
orr r0, r0, #0x02000000
mcr p15, #0x00, r0, c1, c0, #0x01
bx lr
.endasmfunc
Can someone help and explain to me why this is happening?
Thanks,
Alex