I am working with my own boards(S32K144).
J-link can't connect the board :
Connecting to target...ERROR: InitTarget(): PCode returned with error code -1
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
(S32DS v2.0)
Connecting to target...ERROR: Kinetis (connect): Communication error while accessing MDM-AP.
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
Shutting down...
(S32DS v1.3)
The code that may make it happen:
for(j=0;j<0x20;j++)
{
ret = FlashEraseSector(&flashSSDConfig, address+FSL_FEATURE_FLS_PF_BLOCK_SECTOR_SIZE*j, size, pCmdSequence);
}
Did anybody have a similar issue? Any ideas are welcomed.
Thank you very much.
已解决! 转到解答。
Hi,
I'm assuming that debugger and connection to board is okay. So - please check if the board is powered properly. If yes - you probably secured MCU by writing some unknown data to flash config address - 0x400. If it is your case - there is no way back. Secured chip has disconnected JTAG.
If you have another debugger - for example PE Micro, you can try Emergency Kinetis device recovery option:
If everything fails - the soldering iron is only option.
Jiri
Thank you for your help.
It is highly possible that I erase the part of FLASH where is my code present.
I burned the program with the Flash erase code . After that the board cannot work when I burn any other program including example .
I tried J-Flash. When I connected the board, I got the error.
I have made two boards not work.
Can you give me some advice to make the connection successful ?
Thank you very much.
Hi,
I'm assuming that debugger and connection to board is okay. So - please check if the board is powered properly. If yes - you probably secured MCU by writing some unknown data to flash config address - 0x400. If it is your case - there is no way back. Secured chip has disconnected JTAG.
If you have another debugger - for example PE Micro, you can try Emergency Kinetis device recovery option:
If everything fails - the soldering iron is only option.
Jiri
Hey Jiri,
I unfortunately have the same problem. Can you specify what you mean by the "Secured chip has disconnected JTAG"? So I can understand what is going on? Is the Secured chip the MCU or an external chip on the EVB.
More importantly, you specified that I have to use the soldering iron to solve this problem. Can you please go in more detail on what I solder where? It looks I have to solder the reset pin to a pin on the MCU but looking at the EVB schematic it looks like it is wired up directly? I am new to JTAG and this process.
I would like to solve this problem if possible.
Thank you so much and have a great day!
Hi Andrew,
if your chip is secured, back door key disabled and mass erase disabled - there is no way how to recovery MCU (as far as I know). Technically JTAG connection is cut off and you can't connect to MCU even with RAM target. If you are able connect at least with RAM Target project - you can recovery your MCU.
Hope it helps.
Jiri