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
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.