Hello,
I'am working on S32K144(100*PIN), now I can't reprogram the flash while I can do it successfully earlier.
I see it's always staying #cyclic reset that is indicated by TRACE32, after the board is powered on. And then when I run TRACE32script to download program, it will run to stay #erasing flash and never exit then. During this progress, I use flash.UNSECUREerase command.
How should I do to download a program in this condition? Hopefully you will give me some instruction. Thank you!
DEV environment: Eclipse+IAR, TRACE32, Lauterbach debugger, S32K144
The root cause of all the problem faced above is that, the connection between debugger and board is not stable. Just one of the wires is broken, and that is not easy to be found by visual.
Hello,
What did you load to the MCU the last time?
Have you tried to halt the MCU and reprogram it right after POR?
I mean, disconnect the power supply, run the below script, connect the power supply.
sys.CPU S32K144
wait state.power()
system.up
DO c:/t32/demo/arm/flash/s32k CPU=S32K144 PREPAREONLY
FLASH.ReProgram ALL /Erase
DATA.LOAD.ELF "project.elf"
FLASH.ReProgram off
data.list
GO main
WAIT !RUN()
ENDDO
Regards,
Daniel
Hello Daniel,
Thank you!
Your solution is effective, and I recover my board successfully. But unfortunately when I reproduce my problem above again, I try the script but not affect any more this time, and it shows "target reset detected" that I think it may be interrupted by "reset event". How should I do for this?
sys.CPU S32K144
wait state.power()
system.up
DO C:\DevApp\T32\demo\arm\flash\s32k CPU=S32K144 PREPAREONLY
FLASH.ReProgram ALL /Erase
DATA.LOAD.ELF "Application.elf"
FLASH.ReProgram off
data.list
GO main
WAIT !RUN()
ENDDO
Hello Tony,
It is hard to say. What is the application?
There must be something in the application that resets the MCU.
BR,
Daniel
Yes, there is something wrong because last programing process aborted unexpected, then the program doesn't run normally after restart. But I am sure the application program is normal if download successfully.
My question is how to recover the board? event if the download program is not OK and the reset event exists.
In addition, I see the PC pointe to 0xFFFF FFFE readed by debugger as following.