Trying to help a colleague with a "bricked" TMS570LC4357 CPU Module.
It is not possible to flash the part since the flashloader fails.
My colleague has used CCS and I am trying IAR EWARM 8.50.10 FS.
The board has the JTAG reset connected to the cold reset (W7 = nPORRST) which is probably a mistake
since the reset is not proper. The CPU runs and then is stopped by the debugger which resets the PC to 0.
I have tried flashing with XDS200, I-Jet and a J-Link. All fails.
We suspect that the faulty program makes it impossible to execute code, maybe screwing with the MPU.
If I use a J-Link and connect to a running system, I can reset, but single step stops before executing the instruction
I have managed to rewire the J-Link and connect the JTAG reset to Warm Reset (B17= nRST).
When I do this, I can attach to the running system, apply a reset.
The CPU is now running in Supervisor Mode (M=0b10011).
The program stops at the beginning of the faulty application.
I then download an application to RAM and.
set the PC to the beginning of the application.
Single step works until I get to an instruction which is privileged. I.E: MRS.
Then the PC is frozen at that point.
I can change the Program Counter past the privileged instruction and can single step
until I encounter another privileged instruction.
If I use a working board, it will also set M=0b10011, and then single stepping is fine.
Is there anything else that is needed to single step privileged instructions?