How to use Kinetis Bootloader 2.0

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

How to use Kinetis Bootloader 2.0

3,543 Views
shuichiy
Contributor III

Hi all,

I am a custom board which has a MK22FN128VLH10.

Now I'm trying to update the firmware using Kinetis Bootloader 2.0.

At first I have tested the scenario on FRDM-K22F and everything is O.K.

Next I have done using the custom board as follows:

1. Import led_demo_tower_a000 project from apps\led_demo\MK22F12810\kds on KDS then build it (release).

2. Import tower_bootloader project from targets\MK22F12810\kds on KDS then build it (release).

3. Run tower_bootloader then "FSL Loader" drive appears on Windows.

4. Run KinetisFlashTool on Windows then select "USB-HID" and connect.

5. Click "Update" button then following messages appeared.

Connected to device successfully!
Collecting device information......
Device information is updated!
Start update progress......
Updating image......
Error: Update image failed(kStatusMemoryRangeInvalid).
Update process is stopped by error.

Do you think I have something mistakes or misunderstanding ?

Your any comments would be appreciated.

8 Replies

2,340 Views
shuichiy
Contributor III

Hi, Daniel.

Finally I have succeeded to update the firmware!

I needed to modify is_boot_pin_asserted API in hardware_init_K22F128R.c that it should always return false.

It seems the bootloader checks button status  on FRDM/Tower boards but our custom board has no button.

Thanks for your help.

2,340 Views
shuichiy
Contributor III

Hi Daniel,

I'm using Tower bootloader as attached bitmap.

kds.jpg

0 Kudos

2,340 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi  shuichiy

You are running Tower_bootloader,  If your FSL_Loader gone and appears again, probably your LED demo not update successfully. Did you see the led blinking?

Before you begin the update process, please make sure KinetisFlashTool connected correctly, see below picture.

pastedImage_1.png

 

Then you can update your led demo.

pastedImage_2.png

Regards

Daniel

0 Kudos

2,340 Views
shuichiy
Contributor III

Hi Daniel,

Thank you for your response.

I carefully read the thread then tried again, but the situation has not changed.

I tried to update the firmware using both .bin and Intel hex, updating successfully finished but "FSL Folder" drive comes back promptly.

Here is contents of INFO.TXT in the drive and a bitmap of Flash tool.

If you can add any comments, please let me know.

Kinetis Bootloader K2.0.0
System device ID: 0x22000695
Flash size: 131072 bytes
Flash range: 0x00000000-0x0001ffff
Flash sector size: 2048 bytes
Flash blocks: 1
RAM size: 24576 bytes
RAM range: 0x1fffe000-0x20003fff
Reserved region 0: 0x00000000-0x00006fff
Reserved region 1: 0x1fffe000-0x2000051f
Verify writes: yes
Check reserved regions: yes
Boot config present: yes
Peripheral detection timeout: 5000 ms
CPU clock: 48000000 Hz
kft.jpg
0 Kudos

2,340 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi shuichiy:

Please be aware of the difference of flashloader_loader and flashloader, one is one-shot, the other is always in boot mode.  If you are using flashloader, it is normal to stay in boot mode.

Regards

Daniel

0 Kudos

2,340 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Shuichiy:

Please refer to below thread for the procedure.

Setting up Kinetis bootloader on MK22FN128 unsuccessful.

I also copied here:

  Please open KBOOT2.0:NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\targets\MK22F12810

 1  Use tower bootloader:

pastedImage_1.png

2 Download this bootloader to your chip, then modify your application code, and relocate it to 0XA000, build and generate the app.bin file.

3. You can use kinetisFlashTool to download your application code, the tool can be found in folder:

 NXP_Kinetis_Bootloader_2_0_0\NXP_Kinetis_Bootloader_2_0_0\bin\Tools\KinetisFlashTool\win

After you download the application code successfully, you still can download the new application with the fixed flash bootloader again.

Regards

Daniel

0 Kudos

2,340 Views
shuichiy
Contributor III

The problem has gone.

After re-copying Kinetis Bootloader 2.0 and rebuild the program, updating succeeds.

Still there's another problem.

Just after updating the firmware (led-demo), once "FSL Loader" drive has gone then appears again at once.

So I seem the bootloader starts again.

I'm thinking about which program has cause of this, bootloader or led-demo...

0 Kudos

2,340 Views
danielchen
NXP TechSupport
NXP TechSupport

Maybe the led-demo not update successfully.

Regards

Daniel

0 Kudos