General usage of the native USB on FRDM-KL26Z

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

General usage of the native USB on FRDM-KL26Z

Jump to solution
891 Views
funkyguy4000
Contributor II

Hello,

I've been looking through the KL26 family reference manual here: http://cache.freescale.com/files/microcontrollers/doc/ref_manual/KL26P121M48SF4RM.pdf?fasp=1&Parent_...
Long story short, I don't understand the USB implementation.  I've worked with many communication protocols although never usb directly.  I've used UART with a UART to USB bridge but that is as close to USB as i've gotten.eb

Can somebody explain the usage of the USB on the KL26Z? 
Bonus points if you can explain the technical stuff behind it, like in the reference manual, more simply as well!

-Shannon

0 Kudos
1 Solution
498 Views
mjbcswitzerland
Specialist V

Shannon

I have written a document about USB (with some hardware details for the Coldfire which uses the same USB OTG controller as the Kinetis - valid for K and KL devices like the KL26Z) - http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF

Unfortunately it is not simple to explain the operation and the user manual alone gives only a small part of the required details - the rest is study of the specification (best reading some decent books on USB because interpretaion of the specification is also only really possible by someone who who already understands the details anyway) and experimenting.

Maintenancy of the USB driver is not simple since it is heavily interrupt oriented and debugging a device is virtually impossible since a breakpoint during communication immediatly (within ms) causes a host connection to fail. I have therefore developed a Kinetis USB simulation which allow the code to be tested, studied and debugged - modeling the USB-OTG behaviour (use of buffers and interrupts). This is available in the uTasker Kinetis project.

Regards

Mark

View solution in original post

0 Kudos
2 Replies
499 Views
mjbcswitzerland
Specialist V

Shannon

I have written a document about USB (with some hardware details for the Coldfire which uses the same USB OTG controller as the Kinetis - valid for K and KL devices like the KL26Z) - http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF

Unfortunately it is not simple to explain the operation and the user manual alone gives only a small part of the required details - the rest is study of the specification (best reading some decent books on USB because interpretaion of the specification is also only really possible by someone who who already understands the details anyway) and experimenting.

Maintenancy of the USB driver is not simple since it is heavily interrupt oriented and debugging a device is virtually impossible since a breakpoint during communication immediatly (within ms) causes a host connection to fail. I have therefore developed a Kinetis USB simulation which allow the code to be tested, studied and debugged - modeling the USB-OTG behaviour (use of buffers and interrupts). This is available in the uTasker Kinetis project.

Regards

Mark

0 Kudos
498 Views
funkyguy4000
Contributor II

Hey, that looks really great!
I wasn't aware that using native USB would be that difficult.  Thanks god I did use that as my final project for university.

Thanks you for the guidance!

0 Kudos