Using an embedded host to download via I2C to a KL17.

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

Using an embedded host to download via I2C to a KL17.

1,645 Views
dougbaker
Contributor III

I am planning on using a KL17 CPU in a design where the KL17 would communicate to an ARM CPU over I2C.  The KL17 has the latest boot loader “2.0” so we have everything we need on the KL17 side to do a software update over I2C.  What I have not found yet is any sample code / open source / examples for the ARM side (host) to open the binary/Elf for the KL17, parse it and transfer it over the I2C interface.  Is there code examples and or any documentation for the Host side when the host side is another embedded microprocessor using I2C and not a PC using RS232 or USB?

Labels (1)
0 Kudos
4 Replies

1,209 Views
ramboyang
NXP Employee
NXP Employee

Hi Doug and Gordy,

First of all, KL17 has an enbedded ROM which supports programming via I2C, SPI and UART.

To demonstrate the usage of programming flash via I2C interface, there are two types of utilities in Kinetis Bootloader 2.0 release package.

1. buspal - It is based on FRDM-KL25, FRDM-KV46 or TWR-K65 board ,and can be used as a companion of blhost to program image to device, usage: blhost -p COMx,57600 -b i2c,0x10,100 -- write-memory 0 a.bin

2. embedeed host - It is an offline programmer developed for TWR-K65, and it supports programming device via SPI, I2C or UART, source code is available on Kinetis Bootloader 2.0 Release package as well.

Hope above info would be helpful.

Best Regards,

Fan Yang

0 Kudos

1,209 Views
dougbaker
Contributor III

I would also like to ask if there is any source code that will open the binary/Elf for the Kinetis KL17 and bit bang the binary/Elf  into the KL17 via the SWD interface.  The host system that would bit bang the binary/Elf  would use a ARM9 running linux. 

0 Kudos

1,209 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

I'm afraid that we hasn't have the kind of demo as you request and you should manually create this demo.

About the opening and parsing the image codes, I'd highly recommend you to refer to the AN4368' demo.

AN4368 - KL25 USB Mass Storage Device Host Bootloader
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,209 Views
GordyCarlson
NXP Employee
NXP Employee

Adding more info about this application.....

This design is a deeply embedded KL17 that customer doesn't have direct access to externally to reprogram in the field with updates.  They hope to use the embedded FPGA ARM core on that same board to reprogram the KL17 via I2C within that system.

 

Their objective is to modify one of our embedded host utilities to recreate the correct data flow from their ARM FPGA that either BLhost, Flashloader, or Manufacturing tool does externally to a target board being programmed.

 

During our onsite meeting, we clarified the steps needed to put the KL17’s ROM Bootloader into bootloader mode….ie…enable the BOOT pin and other initializations in the BCA registers in the KL17.  Doug will do this.

 

He is going to first attempt to program the KL17 (on Freedom board) using the BLHost utility to confirm he has the target board/chip properly configured for boot mode.

 

He is then going to evaluate the source code that is included in the BOOTLOADER 2.0 download zip, to try and determine what is useful that he can port over to his FPGA/ARM core.

Thanks for the suggestion on that specific AN4368 app note.  Customer will review.  If we have any further questions or clarifications, will post them here on this thread.

Gordy Carlson

NXP FAE

Rochester NY

0 Kudos