Other Parts Discussed in Thread: RM57L843
Hello,
I'm using f021 to flash internal FPROM of a TMS570LC4357 device on a HDK board using auto ECC generation.
I have a boot flashed in sectors 0 and 1 (first 32Kb) which includes interrupt & exception vectors. Then, I have an application beginning at sector 12 (offset 1Mbytes). My application uses f021 library to allow flashing either the application itself, or the boot.
The application runs entirely from RAM (text and const for all functions). Flash shoud only be accessed to fetch the primary interrupt handler (which consists in a branch to the real handler code in RAM)
I always flash by 8Kb chunks globally masking interrupts during programming of each chunk.
I succeed in flashing the application itself without any errors.
But, when trying to flash the boot I get an unexpected bus error (ESM 2.3, red led) during the process. Nonetheless the boot flashing ends up correctly : after power on RST, the updated boot is executed and no further error occurs.
I also looked at the cortex events through the PMU, and noticed 0x6e and 0x71 events for the 3 first 8Kb written, and none for the last 8K chunk. I also tried to deactivate the CPU cache which did not change the global behaviour, but only increased the number of events recorded by the PMU.
The ESM indicates both 1.4 and 2.3 errors (which seems consistent with the events recorded above), while the EPC shows only a single address recorded in the CAM FIFO (0x5308).
How can I debug this and find out what (I suppose) is causing an unexpected access to the flash ?
Thanks,
Dominique