High Speed USB on Kinetis K61 - Freescale USB Stack, Drivers, and Examples

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

High Speed USB on Kinetis K61 - Freescale USB Stack, Drivers, and Examples

2,501 Views
stonerwinst
Contributor I

I am trying to get USB 2.0 high speed to work on our custom board with the Kinetis K61.  I have contacted Kinetis support and they pointed me to the USB Stack v4.0.3 examples:

I perused the v4.0.3 and v4.1.1 but I don't see examples for HS USB.  The examples demonstrate full speed USB only with the KHCI stack.  In the KHCI stack and drivers, they use the USB0 registers which map to the full speed USB interface.

In the EHCI named files, there are references to USBHS and I do see driver for the HS phy (USB3300).  However there are no examples demonstrating functionality.  So I don't know if the HS speed stack and driver work.

Does anyone know if HS USB is even supported/working in Freescale's USB Stack?

Labels (1)
Tags (2)
4 Replies

878 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Winston Kwong,

So far the latest USB stack is released with KSDK, which has not supported K61 or K70 yet, neither for the EHCI driver, so I would recommend you looking into MQX 4.1 or USB stack 4.1.1 which contains USB stack for K70 and EHCI driver as well.

Hope that helps,


Have a great day,
Kan

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

0 Kudos
Reply

878 Views
lineage
Contributor III

Hi,

Sorry for the delayed response, but in case this is useful to anyone else, I ran into this too. I'm using the v4.1.1 stack and it does contain the components to work the HS module, at least as a device, on a K60, so I'm guessing the K61 will be the same. I'm targeting our own board, but prototyping on the tower module at the moment with the TWR-SER2 card.

However, note that I said contains the components...

For some reason Freescale don't talk much about HS on K6x. The stack contains the HS code but only for K70 and then only some examples. But with a fair bit of fiddling it will work on a K6x.

Be warned that the stack and examples are a bit of a mess. The code is tangled, inconsistent, hard to reuse and wrapped around multiple 'devtools' that only serve to make the whole thing more opaque. This seems a fairly consistent picture with all Freescale small devices.

All that said, it does work and it will get you started. You should even be able to switch between FS and HS using a single compile time switch if you work at it. I'd allow a few weeks to get it going and then sort out the mess though.

Good Luck.

878 Views
kirkclendinning
Contributor II

lineage wrote:

Be warned that the stack and examples are a bit of a mess. The code is tangled, inconsistent, hard to reuse and wrapped around multiple 'devtools' that only serve to make the whole thing more opaque. This seems a fairly consistent picture with all Freescale small devices.

I agree, although I'd say total mess rather than a bit of a mess. Some one really smart did a very stupid thing when putting the examples together. Clearly they knew what they were doing, but left almost no breadcrumbs down the path to success. It is easy to get lost in the forest of poorly explained macro definitions. Getting the USB examples to work, then stripping out 90% of the unused code is extremely time consuming.

For the future, NXP, it is clear that the examples were written to make supporting them easy. Sadly, it is the developer community, not the example developer, for whom the code was written. It may be easy to build and maintain, but it is very difficult to understand with the very poor documentation that comes with it.

878 Views
michaelcollins
Contributor I

Care to elaborate what you had to do to get a K60 working in HS using the 4.1.1 stack?

0 Kudos
Reply