I am trying to implement an USB MIDI stack with a SAMD MCU, but it seems to be pretty difficult to me for a lack of experience/knowledge and missing documentation.
This post has two main scopes then:
1) to warn to whom may concern, that every application note in asf.atmel.com link is broken, a new page opens every time and a microchip.com refresh is applied.
So, no learn integration, sadly. Try this: http://asf.atmel.com/docs/latest...
2) to help this poor guy to find good material to better learn the USB stack implementation.
Point 2 expansion:
Right now I understood, in this specific case, the USB-MIDI protocol in some parts.
I learnt its relative USB Device descriptor structures, the config. desc. struts, and how the data packet is wrapped and the communication is done in the framework.
What I am not able to understand is how the ASF USB stack works, it is too complex for me and I have big difficulties to associate which function does what.
Opening up a typical SAMD AtmelStudio USB Project, I see the directory structure as:
│ │ usb_protocol_midi.h (*renamed from* usb_protocol_cdc.c)
│ udi_midi.c *renamed from*
│ udi_midi.h *renamed from*
│ udi_midi_conf.h *renamed from*
│ udi_midi_desc.c *renamed from*
What I learnt from Dan's LUFA library and from midi.org documentation is that:
- I need to define the descriptor and config structures.
- I need to take care of the USB MIDI protocol wrapping
What I can't do, is to understand every USB layer functionalities.
I know, I just need to study the code, but I hope some one of you can shed a light on this thing or give me some good literature to study.