Over the air firmware update

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

Over the air firmware update

4,312 Views
Edu2011
Contributor II

Hi everyone.

Is it possible over the air firmware update program using kl27z256 mcu?

if it is possible, somebody could help me about this and where i may to find information?

Thank you,

Eduardo

Labels (1)
12 Replies

1,849 Views
mayursavaj
Contributor III

Hi everyone.

Is it possible over the air firmware update program using Mk22fx512 mcu?

our device have Gprs capability.

if it is possible, somebody could help me about this and where i may to find information?

 

Thank you, 

Mayur

0 Kudos

1,849 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Eduardo,

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you.

Regarding to your question , I'm not very sure actually, do you want some kinds of wireless bootloader solution such as Bluetooth, WIFI, etc?

I'm looking forward to your reply.
Have a great day,
Ping

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

1,849 Views
Edu2011
Contributor II

Hi, Jeremy

Thank you for your response

We have a device that send data througt tcp protocol (client) using a GPRS connection.
We need develop OTA firmware update.
Could you help me please,

Thank you

Eduardo

0 Kudos

1,849 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Eduardo Panchana,

Thanks for your reply.

Sorry, I'm not family with the GPRS transferring, so I think the sub-implementation you should seek for other support sources.

If the image file has be received through the GPRS connection, in the design, it needs a host master to packing the image file in the frame whose format must follow the KBOOT's protocol, then send it to the KL27 to update the application code.

Have a great day,
Ping

 

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

0 Kudos

1,849 Views
Edu2011
Contributor II

Hello Ping,

sorry if I miss explained my need before.

following my real need:

I have a device based on a KL27Z256 Kinetis Microcontroller which has a firmware developed by me. Due to some needs oif my customer,  I will need to upgrade the firmware Over The Air (FOTA), because the device will be in a remote área.

I need to know the following:

1.- it is posible to apply FOTA to KL27Z256?. IF NOT, what is the most similar kinetis microcontroller that allows FOTA?

2.- if, hte anser is yes, could you please provide me examples or information in how to implement FOTA in KL27 series?

thanks in advance for your help.

Regards,

Eduardo

0 Kudos

1,849 Views
Edu2011
Contributor II

by the way,

I already know how to send information over the air, but i dont know how to upgrade the firmware in the KL27 once received.

regards,

Eduardo

0 Kudos

1,849 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Eduardo Panchana,

The the question is clearly now: how to transfer the recieved firmware to KL27 to upgrade the firmware.

I'd like to share the following approach with you.

1. Firstly, you need one more chip which will be used to transfer the received data to the KL27.

2. According to the Jorge's reply, you already learned the KL27 included a dedicated bootloader firmware stored in a separate ROM memory, and KL27's firmware can be upgraded when the chip send the received data under the KBOOT's protocol.

About establishing the connectiong between the master and target: KL27, I'd highly recommend you to refer to the thread (Master CPU ARM/Linux via I2C connection to Kinetis ROM loader ) for details.

Have a great day,
Ping

 

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

1,849 Views
almarto
Contributor IV

Hi all,

I am developing the same kind of project as Eduardo. In our case, we use a KL17Z128 and need to implement FOTA by a GPRS communication module (SIM800).  I have been able to upgrade firmware via serial port and Kinetis Flash Tool and also with PEMicro multilink and SWD. Our devices will be connected to an IoT platform from where we can download the new firmware and save it into an external SPI Flash and check it. This works properly so far!

I have many doubts on how to transfer the content of the SPI Flash to reflash the KL17Z. Are we forced to use an additional microcontroller in our board to act as a master to implement the flashing algorithm? Can we implement something similar to swap flash mechanism used in K series?

We are stuck in this phase of the development and any feedback is highly appreciated.

BR,

alvaro

0 Kudos

1,849 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Alvaro,

The Kinetis L series don't support the swap feature. As the Jorge Gonzalez mentioned above, you can create your own bootloader algorithm, the master device sends the fireware to the KL17 via UART from the external SPI flash chip and sequentially program the flash with the new firmware.
Have a great day,
Ping

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

1,849 Views
almarto
Contributor IV

Thank you for your comment Ping!

So, as far as I understand, it would be necessary to have two microcontrollers in the embedded system, right? One would simulate the operation of the PC as we do when we use the Kinetis Flash Tools and would pull-down NMI pin and send UART commands to program the other one, which controls the embedded system.The "programmer" microcontroller should handle the GPRS communication, save the new firmware in the SPI Flash, check its content and flash the main microcontroller ... is this the idea behind?

Apart from this, I would like to know which Kinetis families implement swap mechanism for Flash (a part from K series). I guess that newest families like KL17, KL27 or KE1xF, KE1xZ implement ROM bootloader and so there is no other way to flash them than by means of an "slave" microcontroller to interact with the ROM bootloader (pull-down NMI + UART communication). Please let me know if my ideas are right.

BR,

alvaro

0 Kudos

1,849 Views
mjbcswitzerland
Specialist V

Hi Alvaro

This approach is both expensive (HW costs and additional manufacture programming complication) and very complicated in development (not to mention the additional embedded development costs).


As I noted in another of your threads this is already available in the uTasker project as a 2k code that you simply configure and program to the KL17. There is no advantage of having a SWAP flash since this will not be any safer or simpler. It has been proven over 10 years of operation in many LPC, Coldfire and Kinetis projects so represents virtually zero risk.


In case you are worried about its cost of $242.50 for royalty-free product licensing plus 3 months personal email and telephone support to help configure and solving any difficulties you can also simply take it for free as unsupported anonymous down-loader at the site.

Regards

Mark

0 Kudos

1,849 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Eduardo Panchana,

All Kinetis devices have the capability to be reprogram its own internal flash (e.g. via a bootloader). So yes, this is possible with the KL27Z256. Unfortunately we do not have an example implementation using a GPRS module.

In particular the KL27Z256 includes a dedicated bootloader firmware stored in a separate ROM memory.

:smileyinfo: Not all Kinetis parts have a ROM Bootloader. For those Kinetis devices without ROM, a bootloader firmware needs to be programmed in the program flash. See the next link regarding KBOOT and the table with the devices including ROM:

Kinetis Bootloader|NXP 

The ROM bootloader uses an algorithm explained in the Reference_Manual and is typically used together with PC Host tools provided by NXP as part of KBOOT installation package.

As mentioned by Jeremy you might try to leverage the integrated ROM bootloader by receiving firmware data via GPRS and constructing the required frame packets and commands, but this will not be a trivial task if you are not experienced with Kinetis and you need to fully understand KBOOT algorithm.

What I recommend as an easier approach is to create your own bootloader algorithm, receive data packets from the GPRS module, send them to the KL27 via UART (I guess this is the interface to your GPRS module) and sequentially program the flash with the new firmware. As starting point you can refer to the UART and Flash examples in KSDK. Build and download KSDK for your device from the next page:

Software Development Kit for Kinetis MCUs|NXP 

Some things to consider in a Kinetis bootloader:

(1) - Bootloader firmware is usually placed at the start of flash, then the application image needs to be placed at an offset address to give space to the bootloader. Placement and reserved space are handled within the linker file.

(2) - In the application firmware the vector table needs to be relocated to the corresponding offset. This is done by writing to the VTOR register, so it points to the application's vector table.

(3) - It is recommended to reset all peripheral configurations (e.g. UART) before jumping to the application, so it starts from a known state.

For general theory on Kinetis bootloaders you can give a check to some of the Kinetis bootloader application notes:

AN2295    Developer's serial bootloader

AN4367    Ethernet bootloader

AN4370    USB DFU boot loader

AN4368    USB MSD host bootloader

AN4379    USB MSD device bootloader

I hope this information helps. Let me know if you have doubts.

Regards!

Jorge Gonzalez

0 Kudos