OpenSDA on K22F bricked

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

OpenSDA on K22F bricked

4,187件の閲覧回数
imq009
Contributor I

Quite a problem.

It appears I bricked the bootloader on one of my K22F boards.

How do I recover it? I tried flashing OpenSDA with an external CMSIS-DAP adapter using OpenOCD.

Even though it said it had successfully managed to write the data the bootloader isn't working.

Could someone please give me a hint or two as of what to do in this situation?

Thank you

ラベル(2)
タグ(3)
0 件の賞賛
返信
5 返答(返信)

2,976件の閲覧回数
BlackNight
NXP Employee
NXP Employee

See Recovering the FRDM-K64F Bootloader, or: Cloning the Program of a Microcontroller | MCU on Eclipse . Keep in mind that the FRDM-K64F and the FRDM-K22F are using bootloaders with different base address.

You can get the files as well here: OpenSDA Serial and Debug Adapter|NXP

Erich

0 件の賞賛
返信

2,976件の閲覧回数
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Slawomir Blauciak:

I suppose you have a FRDM-K22F.

Try holding down the reset button (SW1) and then connect the USB cable to J5 (micro-USB). Can you see the board enumerated as BOOTLOADER in your PC?

If you can see it then the bootloader must be working. Try loading either the attached P&E or Segger J-Link binary to the BOOTLOADER volume:

P&E: DEBUG-FRDM-K22F_Pemicro_v108b_for_OpenSDA_v2.1.bin

Segger: ​JLink_OpenSDA_V2_1.bin​

In case you cannot see the BOOTLOADER volume enumerated, then you are correct that the firmware in the K20DX128 should be corrupted. For that case you need an external programmer (e.g. P&E Universal Multilink or Segger J-Link) to program the on-board K20 with the bootloader firmware attached (called 0221_k20dx128_k22f_0x8000.bin).

I hope this helps.

Regards!

Jorge Gonzalez

0 件の賞賛
返信

2,976件の閲覧回数
cwpaynter
Contributor III

I seem to have the same problem with my FRDM-K22F - I do have a P&E Multilink and am using Kinetis Design Studio, and the "Flash from File" function doesn't seem to support .bin files?  When I try, I get the following errors:

Error in final launch sequence

Failed to execute MI command:

symbol-file "E:\\chris\\tools\\debug binary for frdm-k22f - 0221_k20dx128_k22f_0x8000.bin"

Error message from debugger back end:

`E:\chris\tools\debug binary for frdm-k22f - 0221_k20dx128_k22f_0x8000.bin': can't read symbols: File format not recognized.

`E:\chris\tools\debug binary for frdm-k22f - 0221_k20dx128_k22f_0x8000.bin': can't read symbols: File format not recognized.

Jorge, are you aware of a way to use KDS to flash .bin files?

cheers, Chris Paynter

0 件の賞賛
返信

2,976件の閲覧回数
cwpaynter
Contributor III

I was eventually able to get my FRDM-K22F working again via the following:

- dug out old IAR / Segger J-link from a past life

- used JLink Commander (command line tool) to dump the K20 contents from another working FRDM-K22F board

- write those contents into the K20 on the bricked unit

Interestingly, I was not able to ever get the P&E debugger to work with the K20, though the JLink had no problem.  I also tried programming just the "frdm-k22f - 0221_k20dx128_k22f_0x8000.bin" file into the K20, and that didn't work either.  Doing a file compare on the dump from the working FRDM board and the frdm-k22f - 0221_k20dx128_k22f_0x8000.bin file shows quite a few differences.

0 件の賞賛
返信

2,976件の閲覧回数
kgouveia
Contributor II

Hi Chris Paynter,

Would you share your dump .bin file? I have only one K22F bricked and I can't to dump the k20 memory.

Thanks,

Kleber.

0 件の賞賛
返信