Other Parts Discussed in Thread: TMS570LS20216
Hello,
I am using smx RTOS version 4.0.0 along with IAR Embedded Workbench 6.0 (and a C++ compiler) to work in a TMS570LS20216 device, and I am trying to create boot code that will reside in Bank 0 of the device that can act as a downloader of a binary file and program it in Bank 1 (along with ECC values that I calculate and program to flash thanks to the F035 API). Once I finish programming the new app code, I want to branch to it (so that it runs) and once there I want to enable ECC (i.e. EDACEN = 0xA according the Technical Reference Manual).
What I'm not sure is what happens next if correctable errors or uncorrectable errors occur.
1) Does hardware (CPU and Flash wrapper) fix correctable errors automatically and continue executing the code without stopping?
2) Do I need to enable the ECC checking inside CPU (as shown in p.274 of reference manual) so that correctable errors are automatically fixed? Or would the flash wrapper enable (EDACEN = 0xA) be enough for hardware to automatically fix correctable errors?
With uncorrectable errors I've seen in document spns141f that there is a "Flash (ATCM) - uncorrectable error" which causes a non-maskable interrupt because it is connected to Group2 channel 4, but then it also shows a "Flash (ATCM) - ECC uncorrectable error" which causes an Abort because it is connected to Group3 channel 7. The first case is much easier for me to handle because I can update the VIM ISR vector table in the app code and then the correct service routine is executed. The second case is really bad since the Abort will cause the app code to jump to Bank 0 for the abort even though Bank 0 is not part of the app code's memory space, and the theory is that the boot code memory space (Bank 0) has no knowledge of how to handle uncorrectable errors that occurred in the app code. So...
3) What happens next? Is the uncorrectable error that is asserted the one that causes the interrupt or the abort?
4) If the Abort exception is the one that will run, which Abort exception will occur? Data or Prefetch Abort?
5) What is the difference between those two types of uncorrectable errors that force them to cause two different types of exceptions?
As you can see this is aimed at being able to implement ISRs if either correctable or uncorrectable errors once ECC is enabled, so I guess that the general question of this very long post is
6) How do I implement service routines for ECC checking if errors occur in the device?
I would appreciate any help you can give me,
Juan Martinez