7 years, 10 months ago.

How to recover FRDM-K22F?

I tried to update my FRDM-K22F firmware using Windows 10. Unfortunately I didn't realise that mBed has issues with Windows 10 and it seems to have broken. Surely there should be more prominent warnings that updating the firmware with the most popular OS in the world will *brick your device*?!? In fact there aren't any warnings on the FRDM-K22F firmware update page.

Anyway, now when I plug a USB cable into the OpenSDA port I get nothing. No USB connection, not even a power LED. I get a power LED from the other USB port.

Is there any way to recover this? I have an SWD programmer I can possibly use.

Question relating to:

The FRDM-K22F is an ultra-low-cost development platform for Kinetis K Series K2x (K22F) MCUs built on ARM® Cortex™-M4 processor. Features include easy access to MCU I/O, battery-ready, low-power operation, a …

Hi Tim - Can you share the state of your board? If you hold reset when powering does the bootloader still mount? I'll get a device and windows 10 to investigate but was there any thing other than starting the bootloader and drag-n-drop you did?

posted by Sam Grove 18 May 2016

Nope - it doesn't show up as a USB device at all. I don't think I did anything other than starting the bootloader and dragging the firmware on to it. However it is possible that the USB cable was dodgy and disconnected during the transfer. I'm not sure about that.

I think the problem might be Windows 10 automatically copying files on to USB drives: https://mcuoneclipse.com/2014/11/01/illustrated-step-by-step-instructions-updating-the-freescale-freedom-board-firmware/

posted by Tim H 20 May 2016

In any case, is there a way to use SWD to reflash the board?

posted by Tim H 20 May 2016

2 Answers

7 years, 9 months ago.

Hi Tim

I confirm that you can reprogram the OpenSDA bootloader using an external probe connected to the SDA SWD port J12.
Please find attached to this message the binary file of the original bootloader (OpenSDA v2.1) for the FRDM-K22F.
original OpenSDA v2.1 Bootloader binary for FRDM-K22F

Software team is working on a new bootloader (OpenSDA v2.2), which has not been fully tested yet with every OpenSDA Applications, but it should guarantee a better support with Windows 10 computers.
So far, the OpenSDA Applications (designed for the bootloader v2.1) that I have tested work indifferently on OpenSDA v2.1 and OpenSDA v2.2 bootloaders.
new OpenSDA v2.2 Bootloader binary for FRDM-K22F

If you are using a Segger JLink probe, I recommend you to use 'JLink Commander' as a software programming tool.
It is available for free in the latest 'Software and Documentation Pack' for Windows DIRECT LINK

To reprogram the Bootloader of the OpenSDA interface of your board
1. Copy the k20dx128_bootloader_v21_0x8000.bin file at the rooth of the Segger Software installation path (ex: C:\Program file\SEGGER\JLink_V502f)
2. Connect your JLink probe to your computer
3. Connect an USB cable between your computer and the SDA USB connector to power your board
3. Press Windows Start button
4. Search "Commander" and in the list select JLink Commander
5. Type the following commands
a. device MK20DX128xxx5
b. loadbin k20dx128_bootloader_v21_0x8000.bin, 0
c. r
d. exit
6. Disconnect the probe from the SDA SWD connector J12
7. Disconnect the USB cable from the SDA USB port
8. Reconnect the USB cable to the SDA USB port while pressing the Reset button, then release it after 1s
You should now see in your file explorer the drive BOOTLOADER (OpenSDA v2.1) or DAPLINKBOOT (OpenSDA v2.2)
You are now ready to program a new OpenSDA Application by drag'n dropping the corresponding binary into the BOOTLOADER (or DAPLINKBOOT) drive from your file explorer...


Quick explanations of the commands:
a. The OpenSDA interface of the FRDM-K22F is materialized by a Kinetis MK20DX128 microcontroller
b. Command to flash the new binary file
c. Reset the OpenSDA MCU
d. Close JLink Commander


Please let us know if those instructions resolved your issue.

Accepted Answer

Hi, I'm finally getting around to trying this, but the SWD headers don't have a pin removed as they should so I can't even connect the SWD cable. Which pin should I cut?

posted by Tim H 29 Oct 2016

Never mind - I found it is easy to remove the key from the cable, and helpfully the silkscreen on the back of the connector has pin numbers. The rest of the instructions worked like a charm! (Except 5b. should be ..._v22_... not v21). Thanks!!

posted by Tim H 29 Oct 2016

I am getting WARNING-Reset pin 15 is high .should be low.Please check target hardware. Could you please let me know what would be the issue for FRDM-K22F board.

posted by jyotiranjan bhuyan 21 Apr 2017

Hi, was this firmware ever released? Where can I get the latest OpenSDA for FRDM-K22F?

posted by Tim H 04 Oct 2017
7 years, 9 months ago.

I had a bricked K22F board, and I used a JLink recovered the OpenSDA firmware

just use a JLink interface and connect it to the 10-pin SWD port

I had success with the connecting the j-link to J12 (SDA) do not make the mistake connecting to J11 (JTAG, will not work) and use the k20dx128_bootloader_v22_0x8000.bin file. Do not forget to put power on J5 (SDA-USB) near the reset button SW1. Many thanks for the post of Greg C.

posted by Gerrit Pathuis 07 Jan 2018