K22PM121x Flashloader

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

K22PM121x Flashloader

Jump to solution
5,951 Views
brunopaillard
Contributor III

Is there a way to install the Kinetis Flashloader into the MK22P121Mxx microcontroller (on the FRDM K22F board) so that it behaves like a production device.

I need to work on production tools.

Thanks

Bruno

0 Kudos
Reply
1 Solution
4,642 Views
mjbcswitzerland
Specialist V

Hi Bruno

My FRDM-K22F board started to behave reliably again yesterday (alhough I didn't do anything to it (?)) so I took the opportunity to complete validation of the work that I was completing on it (in parallel with the TWR-K22F120M, which was always behaving normally).

At these links I have posted KBOOT compatible (UART and USB-HID) loaders (including also USB-MSD composite since the KBOOT PC tool is presently too slow for productive use)

http://www.utasker.com/kinetis/FRDM-K22F.html

µTasker Kinetis TWR-K22F120M support

Then I re-verified with the freedom_bootloader.bin (powering the board via the OpenSDA connector and directly via the K22's USB connector).

1. Connecting and powering directly to the K22 causes enumeration to start but it fails during the process. I think that the embedded code sets the USB to suspend state (maybe much too soon, and during the enumeration). Since the reset button doesn't work when powered like this the board is then not further usable.

2 Powering via the OpenSDA connection and connecting the K22 USB doesn't do much useful - I didn't see it responding to any enumeration SETUP tokens and it set itself to suspend again.

However, a reset using the push button then allows it to work and KBOOT can subsequently be used.

So I tried the compatible KBOOT version that I had prepared in both configurations as comparison (you can do the same if you are interested - the binary "uTaskerSerialBoot_FRDM-K22F_KBOOT_HID_UART_MSD.bin" is on the linked page.

In both cases the enumeration (there is a lot more activity since the MSD hard drive is also being mounted by the PC on connection) was normal and the MSD part worked correcty.

I am not sure about the KBOOT PC software because I find that sometimes it doesn't see the interface and when I close and open it again it then it does (I think that it is generally not yet very stable).

Therefore I can confirm that the KBOOT embedded USB-HID mode is presently not reliable on either connection configurations. A manual reset recovers (when powered by the OpenSDA connector) but it never operates when powered only via the K22 USB connector. In comparison, I can use the uTasker KBOOT compatible version in both configurations. This means the issue must be of embedded SW nature and so improvements must also be possible.

Regards

Mark

µTasker Kinetis support

View solution in original post

0 Kudos
Reply
30 Replies
1,021 Views
brunopaillard
Contributor III

Hi Jay

Thank you for the feedback. Since at this time you don't know the cause exactly, I should probably expect that behavior on a board of our design as well.

Thanks

Bruno

0 Kudos
Reply
1,021 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Bruno,

I've contacted with a KBOOT expert form KBOOT develop team about this issue and please bear with us, we will inform you if we work it out.
Have a great day,
Ping

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

0 Kudos
Reply
1,021 Views
brunopaillard
Contributor III

Thanks Ping. This is much appreciated.

Bruno

0 Kudos
Reply
1,021 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Bruno,

Jie Heng is KBOOT expert who I mentioned in the previous reply, and we will inform you ASAP if we figure out the root reason that cause this issue.
Have a great day,
Ping

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

0 Kudos
Reply
1,023 Views
mjbcswitzerland
Specialist V

Bruno

You need to login to your "My Freescale" acount

pastedImage_2.png

Here it shows as "Mark's Freescale" and yours will presumably show as "Bruno's Freescale"

and then there you have:

pastedImage_0.png

Regards

Mark

http://www.utasker.com/kinetis.html

0 Kudos
Reply
1,021 Views
brunopaillard
Contributor III

Thanks again Mark!

I just sent it.

0 Kudos
Reply
1,023 Views
mjbcswitzerland
Specialist V

Jorge

I am interested in the K22 pre-loaded version due to the fact that the KBOOT loader generally assumes a certain clock (oscillator or crystal) so that it gets its speeds right.

Since when a chip is delivered it is not possible to know what will be clocking it in the final circuit it must be based on internal clocks instead.

In this post Re: Re: USB boot loader for K64FN1M0VMD12 ? (towards the end) I have made a version of the KBOOT USB loader for the K64 which supports USB, based on the IRC48M, which allows crystal-less USB operation (also explained in AN4905). Is it therefore true that the K22's pre-installed KBOOT loader supports USB by utilising its crystal-less USB capability?

On the other hand, it would presumably mean that any Kinetis types without IRC48M will not be able to support USB loading based on a pre-installed KBOOT version unless the oscillator/crystal used is also pre-defined. Are these presumptions true for the pre-installed KBOOT restraints?

Regards

Mark

0 Kudos
Reply
1,023 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Mark:

This is an extract from K22 reference manual (Chapter 13 Kinetis Flashloader):

K22_FlashLoader.png

So your assumption is correct.

About the Kinetis parts without IRC48, that is an interesting question, but I have no information about it right now, sorry.

Regards!

Jorge Gonzalez

0 Kudos
Reply
1,023 Views
mjbcswitzerland
Specialist V

Hi Jorge

Thanks for the reference - sorry that I didn't look it up myself because that would already have cleared up the first question.

I am assuming that the K22 has been chosen as first part with the KBOOT loader delivered pre-installed due to the crystal-less capability, which solves the problem of HW clocks.

Other devices with built-in USB loaders, such as the ATMEL SAM series (with the loader in ROM and available since 2005), require a certain standard crystal to be installed for it to be able to be used. Probably such a requirement will exist with parts that don't have the IRC48M if the USB is to be used - we will see once they start containing one.

Regards

Mark

0 Kudos
Reply
1,023 Views
brunopaillard
Contributor III

Thanks Jorge

I will keep an eye out for it.

Regards

Bruno

0 Kudos
Reply