Flash a not responding FRDM-KL25Z board

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flash a not responding FRDM-KL25Z board

942 Views
pascalsandrez
NXP Employee
NXP Employee


Hello


I'd like to have some help to recover a FRDM-KL25Z board not showing up as mass storage anymore.
At the beginning it was not showing up in normal mode (as KL25Z disk) so I went to bootloader mode. The mass storage device BOOTLOADER appeared and I tried to put 12_OpenSDA_FRDM-KL25Z.bin then MSD-DEBUG-FRDM-KL25Z_Pemicro_v118.SDA to update it. Now it's worse, it does not start as bootloader mode anymore and no led is blinking at all.
I may have done something wrong, I am in windows 10 and PE drivers are fine, other boards are correctly detected.
I have a SEGGER jlink mini and was thinking to flash the bootloader using it. I plug it on SWD port and use jflash. I am able to connect to KL25Z128, it is detected and initialized correctly with the tool. But when connecting to SDA SWD port to flash the K20DX128VLF5, it is not able to connect. Here is the log:

Connecting ...
- Connecting via USB to probe/ programmer device 0
- Probe/ Programmer firmware: J-Link EDU Mini V1 compiled Jan 30 2023 11:25:44
- Probe/ Programmer S/N: 801003735
- Device "MK20DX128XXX5" selected.
- InitTarget()
- Connect Under Reset
- Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
- Could not measure total IR len. TDO is constant high.
- Failed to identify target. Resetting via Reset pin and trying again.
- InitTarget()
- Connect Under Reset
- Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
- Could not measure total IR len. TDO is constant high.
- Target interface speed: 1000 kHz (Auto)
- VTarget = 3.299V
- InitTarget()
- Connect Under Reset
- Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
- Could not measure total IR len. TDO is constant high.
- Failed to identify target. Resetting via Reset pin and trying again.
- InitTarget()
- Connect Under Reset
- Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.
- Could not measure total IR len. TDO is constant high.
- Executing init sequence ...
- ERROR: Could not perform target reset
- ERROR: Failed to connect.
Could not perform custom init sequence.

What can be wrong, am I doing the right things?

Thanks
Pascal

0 Kudos
Reply
8 Replies

929 Views
pascalsandrez
NXP Employee
NXP Employee

Ok thanks,

I've tried the recovery process, I enabled "Do not allow locations on removable drives to be added to libraries" then tried to run as bootloader but nothing happen, I also don't have any led blinking. 

Is it possible I killed the board while trying to update bootloader (the board was starting as bootloader few days ago)?

Pascal

0 Kudos
Reply

920 Views
ErichStyger
Specialist I

Hi Pascal,

I don't think you bricked the KL25Z, but there is always the possibility.

I would solder the debug header for the KL25Z and try programming it with the J-Link to see if the KL25Z still works.

Erich

0 Kudos
Reply

918 Views
pascalsandrez
NXP Employee
NXP Employee

Ok, so you mean it could work if I reprogram the KL25Z using jlink? This seams feasible as I connection to it with jlink seems to work properly. 

What is the binary file I should use for that? I guess it is not any of the *.SDA files, Jlink tools don't recognize those file types and don't want to load it.

Thanks

Pascal

0 Kudos
Reply

912 Views
ErichStyger
Specialist I

Yes, if you have the SWD debug header populated on your board (see https://mcuoneclipse.com/2012/10/23/completing-the-frdm-kl25z-board/) you can use any external SWD debugger for it, see https://mcuoneclipse.com/2012/11/07/jtagswd-debugging-with-the-frdm-kl25z-board/

You don't need any special binary: simply use your J-Link to program the KL25Z ELF/Dwarf (.elf or .dxf) file to it. This is supported by default with the NXP MCUXpresso IDE.

0 Kudos
Reply

903 Views
pascalsandrez
NXP Employee
NXP Employee

Ok so even if open SDA can't be used anymore, I can still use the board and program the kl25 using SWD port. Is that what you mean ?

For information, up to now I only used mbed to develop the program and program the board using open SDA. That was quite handy if you don't need to debug. I never used MCUXpresso.

Pascal

0 Kudos
Reply

900 Views
ErichStyger
Specialist I

Yes, even with OpenSDA not working any more, you always can use the SWD debug port.

That's the purpose of it

0 Kudos
Reply

852 Views
pascalsandrez
NXP Employee
NXP Employee

Ok, thanks

0 Kudos
Reply

934 Views
ErichStyger
Specialist I

Hi Pascal,

the important message is this one:

- Readout protection is set and mass erase is disabled. J-Link cannot unprotect the device.

The thing is that the K20 is protected, and you cannot erase/change the firmware with a debugger on it.

This is how the OpenSDA V1.0 devices are protected/locked. So you cannot program it with a J-Link or similar, you only can program it with the bootloader.

As for recovering you board: https://mcuoneclipse.com/2016/08/01/bricking_and_recovering_opensda_boards_in_windows_8_and_10/

Erich

0 Kudos
Reply