Reflashing the MCU via the serial port

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

Reflashing the MCU via the serial port

774 Views
robertpoor
Senior Contributor I

We are building a device around the KL27Z.  Once it has been packaged and sealed, the only access we have to it is the serial port.  (In particular, no USB, no reset button.)  Once in a while, we would like to be able to update the application code running in the processor.

So my question is: is there a serial bootloader -- either resident in ROM or available to incorporate into our application -- that we can call on demand that will allow re-flashing of the application code via the serial port?

Naturally, we would have a dedicated app running on the host processor on the other end of the serial line.

I've looked over a few documents, e.g. http://www.nxp.com/assets/documents/data/en/user-guides/KFLLDRUG.pdf  and http://www.nxp.com/assets/documents/data/en/user-guides/KBTLDRDEMOUG.pdf , and I have to admit I don't understand the difference between 'bootloader' and 'flashloader' (if there is actually a difference).  But more to the point, I'm not sure what's available.  

Oh, one final word: if we absolutely need a reset line or some external signal to invoke the bootloader, we can probably provide that.  

Pointers and example are welcome!

0 Kudos
3 Replies

603 Views
mjbcswitzerland
Specialist V

Hi

The KL27 contains a serial loader in its ROM that can be started via command. It requires the NXP loader software on the PC to work with.

Alternatively you can also get various serial loaders from
http://www.utasker.com/kinetis/FRDM-KL27Z.html
http://www.utasker.com/kinetis/Capuccino-KL27.html

(UART SREC, iHex, KDS compatible, AN2297 developer's loader compatible) which supports application commanding to loader mode.

Document: http://www.utasker.com/docs/uTasker/uTaskerSerialLoader.PDF

Available as open source (works on all Kinetis parts in any of 10 IDEs so no porting needed) at http://www.utasker.com/forum/index.php?topic=1721.msg7086#msg7086

For professional users there are also supported options with remote desk top support and tutorials to avoid any loss of time due to potential learning curves. It allows complete operation simulation and easy modifications to custom requirements.


Regards

Mark


Professional support for Kinetis: http://www.utasker.com/index.html
Remote desktop one-on-one coaching: http://www.utasker.com/services.html
Getting started to expert videos: https://www.youtube.com/results?search_query=utasker+shorts

0 Kudos

603 Views
robertpoor
Senior Contributor I

The built-in ROM loader is probably our best option (especially since program space is precious).  Am I correct in thinking this is the document that says how to call it from a user program:

    http://www.nxp.com/assets/documents/data/en/reference-manuals/KBTLDR200RM.pdf 

(Section 2.6, "Bootloader Entry Point"), or is there some other document I should be reading as well?

0 Kudos

603 Views
mjbcswitzerland
Specialist V

Hi

I would use the following register to do it:

pastedImage_1.png

Regards

Mark

0 Kudos