General usage of the native USB on FRDM-KL26Z

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

General usage of the native USB on FRDM-KL26Z

跳至解决方案
901 次查看
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 项奖励
1 解答
508 次查看
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 项奖励
2 回复数
509 次查看
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 项奖励
508 次查看
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 项奖励