AnsweredAssumed Answered

STM32 USB On-The-Go Host and Device Library: structure?

Question asked by Juha Aaltonen on Dec 29, 2013
Latest reply on Mar 22, 2016 by ringenberg.jairo
I'm in a process of trying to write an USB Host CDC program (Full Speed only).
This is my first encounter with USB-internals and STM32-chips.

I still haven't figured out what should go into which file / directory or what interrupt to use for waking the end point data transfer code to check whether there is something to move or not.
It's hard to follow the examples without knowing where the actions get initiated.
I don't have much time, and the right stuff is hard to find in the documents (the library and chip).

The files whose contents I'm wondering especially about, are:
...\STM32_USB_HOST_Library\Class\CDC\inc\usbh_cdc_core.h
...\STM32_USB_HOST_Library\Class\CDC\src\usbh_cdc_core.c
...\USB_Host_Examples\CDC\inc\usbh_usr.h
...\USB_Host_Examples\CDC\src\usbh_usr.c
(maybe some other VCP-files?)

I have been trying to put the SW together by editing the MSC example looking into VCP-device example on the side.

I understand that in the device example it's periodic transfer interrupt that is used for triggering the "situation check" for USB EP transfers, while RS-side minds its own business using rx/tx interrupts?

That is: what is supposed to be the interface to the library, and what should be left in the application side. The catch is that I shoud add a protocol (in between the USB and Serial) later when I get the raw bytes flowing through. I'm using STM3240G-EVAL.
At the moment I'm using Eclipse, but the stuff should eventually be brought into a commercial IDE.
(Quite a lot of work putting together an Eclipse project...)

Outcomes