USB engine framework

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

USB engine framework

727 Views
andrzejklonowsk
Contributor I

Hello,

I try understand how USB engine works in Kinetis processor and I can not to find a good documentation.

I get of course some example implemetation USB CDC class but it is not enough. In examples are some mistake:

in data packt counter, it is 10 bit, not 16, next while are prepare 16 buffers if USB CDC class requires only 3?.

This waste memory.

I supose that a person who make code as USB  has more detailed documentation because user manual is not enough and it is impossible to write any working code as example USB. Please send detailed information how USB engine works with BDT (Buffer descriptor table) and buffers memory.

Thank you

Andrzej

Labels (2)
0 Kudos
3 Replies

506 Views
isaacavila
NXP Employee
NXP Employee

Hello Andrzej

Here you can find two application notes that talk a illustrate an In-depth Understanding of USB module for 8-bit MCU. This USB module is almost the same that Kinetis' one, so hope this can be helpful for understand more about BDT and buffer structure:

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3560.pdf

and

http://www.nxp.com/files/microcontrollers/doc/app_note/AN3492.pdf (this one talks a little more to USB transactions but also refer to OTG module from Coldfire).

Also, this community post is also referring to BDT information and hope you can find it useful: Kinetis L USB BDT

Regards,

Isaac

0 Kudos

506 Views
mjbcswitzerland
Specialist V

Hi

To learn about USB operation you can also look at:

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

This contains a Kinetis USB engine simulator which allows the USB controller operation to be analysed and all code using it to be tested and verified.

It allows accurate simulation of CDC (including up to 6 composite USB-CDC to UART bridges), RNDIS, MSD, Audio, mouse and keyboard devices as well as CDC and MSD host (including memory stick emulation).

New classes and applications can be added as required with greatly increased efficiency compared to traditional methods.

Some docs:

http://www.utasker.com/docs/uTasker/uTaskerV1.3_USB_Demo.PDF

http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF

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

The code includes various classes that have been proven in industrial projects, are operational on all Kinetis parts without needing porting and can be built with all popular compilers or IDEs.

Regards

Mark

0 Kudos

506 Views
bobpaddock
Senior Contributor III

The Microchip PIC32 documentation describes what is going on better than Freescale/NXP docs.

While the register names and bit names are different between PIC32/Kinetis it is the same fundamental core that they both bought from some third-party supplier.
http://ww1.microchip.com/downloads/en/DeviceDoc/61126F.pdf USB OTG Chapter.

Attached is USB Generic HID demo for the FRDM-KL25Z Freedom Board

is something I was working on three years ago when my wife died so never really got it finished.

The comments there should help you out.  The DATA0/DATA1 toggling is broken in that code I found out subsequently.

Real Soon Now I'll get a proper working version on GitHub, perhaps along with a book with all of the code I've gathered that doesn't use any Freescale/NXP  'frameworks' or other bloatware caused by PE/KDS...

USB specific questions (not chip questions) should be asked here:

USB at Jan Alexson's site.

0 Kudos