USB boot loader for K64FN1M0VMD12 ?

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

USB boot loader for K64FN1M0VMD12 ?

Jump to solution
3,835 Views
nitinharish
Contributor V

Folks (Most likely I think mjbcswitzerland might answer: Thanks to you in advance, Mark)

I am trying to use FSL 1.0.2 and I have K64FN1M0VMD12 processor on our board (which has USB interface).

Right out of the box, FSL 1.0.2 (Kinetis Boot loader) initializes the USB port with default PID=0x0073, VID=0x15a2 via BCA area.

As soon as I connect the USB port from my processor board to Windows, it sees it as an "unknown device" and I cannot seem to find the device driver for it (I am using Win 7 x64).

What do I need to do/ Am I missing a step here ?

Labels (2)
1 Solution
2,906 Views
mjbcswitzerland
Specialist V

Nitin

This looks OK on my FRDM-K64F board - it appears as "Kinetis Bootloader" when the USB cable is connected.

This suggests that you have a HW problem with your board, as long as it is not due to the 60MHz oscillator input, which is higher than the max. specified value.

Note that you could run from an internal clock instead - the K64 can also operate derived from its IRC (See AN4905 "Crystal-less USB operation") so it should be possible prove that it is not the 60MHz oscillator (with a bit of effort to configure the other clock sources).

Presently I don't have an option to select this mode so I can't switch to it without implementing the configuration according to the application note.

Hoevere, if I can implement it and prove it on the FRDM-K64F I expect that it will also be able to operate on any K64 based board due to the fact that there is then nothing HW dependent for the USB operation. If you can find a reference binary file for this from Freescale (showing crystal-less operation ) you could also use that to verfify that your USB HW can work correctly.

I will take a look at what is needed later on today and maybe be able to send a reference binary in case you don't already find one from Freescale in the meantime.

Regards

Mark

View solution in original post

27 Replies
371 Views
mjbcswitzerland
Specialist V

Nitin

Make sure that you haven't forgotten a 2.2uF capacitor on the VOUT33 pin since this is used to stabilise the power supply to the USB transceiver. And of course that VREGIN is connected to (about) 5V or to the USB bus power line.

pastedImage_0.png

Regards

Mark

0 Kudos
Reply
371 Views
nitinharish
Contributor V

Mark, as per K64 TWR schematic (https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB4QFjAA&url=htt...)  looks like capacitor value (VOUT33) should be 0.1uF and that is what I have on my board too.

Can you please double check your source for 2.2uF ?

0 Kudos
Reply
371 Views
mjbcswitzerland
Specialist V

Nitin

See the K64 electrical specifications (data sheet):

pastedImage_0.png

The TWR-K64 does have 0.1uF but the FRDM-K64F has the 2.2uF. Both have a 10uF decoupling on the VREGIN pin.

I don't actually have a TWR-K64 at the moment (I am ordering a further 13 TWR and FRDM boards at the end of the week to ensure that I have the full set again - on top of the 24 that I already have and have built and tested loaders for) so was not aware that the capacitor may be incorrect on it. Whether things still work or not may depend on combined factors though.

Regards

Mark

0 Kudos
Reply
371 Views
nitinharish
Contributor V

I am glad we both are benefiting from this conversation !

0 Kudos
Reply
371 Views
mjbcswitzerland
Specialist V

Nitin

I have attached a version of the KBOOT HID loader which should run on "any" K64 board by operating "crystal-less" (if the external oscillator is removed/disabled it will still work).

It uses the default FLL configuration (20MHz..25MHz range) for the system clock (about 32kHz x 640 FLL multiplication) and uses the IRC48M for the USB clock. This clock is 48MHz +/- 1.5% trimmed but uses the received USB frame rate to adjust itself to an accurate 48MHz (see AN4905 for more details).

There are no problems for the KBOOT HID operation since the USB is accurate and the system clock is not critical - in fact on my board the system clock was running about 6% slower than nominal but this was still good enough for the 57'600Baud KBOOT UART to operate (even if theoretically out of RS232 specification).

I would have liked to use the IRC48M as system clock source (either directly with 48MHz or multiplied up using the PLL) since it would give the most accurate crystal-less system clock but decided against it due to the fact that it is a bit 'delicate' - some USB settings need to be performed before configuring the clock and if  the USB reset command is issued it will stop the system clock and not be able to recover - according to the application note future silicon versions will have more control of it to avoid this potential problem so it is probably best to wait until it has been resolved correctly.

If the USB doesn't work on your board with this it can only be due to other HW issues and no longer due to oscillators.

Regards

Mark

371 Views
nitinharish
Contributor V

Thank you so much Mark.

And you were right, my board had an issue with USB circuit.

How I wish I could make you the CZAR of Freescale Boot loaders.

Thank you so much for your patience and support all the way.

0 Kudos
Reply
371 Views
nitinharish
Contributor V

Here are the MCG registers:

MCG Registers.jpg

0 Kudos
Reply