cancel
Showing results for 
Search instead for 
Did you mean: 

Detailed Manuel to USB_Device_Examples

j-fischer-gundlach
Associate II
Posted on April 12, 2012 at 10:13

Hello there,

i have downloaded the ''STM32_USB-Host-Device_Lib_V2.1.0'' library, installed the VCP driver and the VCP USB_Device_Example works on the MCBSTM32C board ''out-of-the-box''. Great thing at this point!

As i thought, the example is more complicate than the one´s for the ADC, i have worked previous with. So i wanted to ask if there is a more detailed manual, wich explains how the components in the example work together(wich source fullfill wich aim). Otherwise i would have to do a lot of reverse engeneering to get how the things work behind the scenes for adapting it to my own project.

best regards,

Justus
3 REPLIES 3
j-fischer-gundlach
Associate II
Posted on April 12, 2012 at 11:44

Ok, i found something, wich looks to be the correct one.

 

UM1021 is the usermanuel to explain, what goes on in the library.

j-fischer-gundlach
Associate II
Posted on April 13, 2012 at 14:47

Hey,

there is one important thing left, i can´t really figure out:

In the basic VCP example, the received data are passed to the USART=>TX of the processor, and from the USART=> RX to the IN of the Endpoint. I can´t find out, in wich file this happens. What i found is on page 28 of the UM1021,

''The applicatoin has also to use the general USB ISR and speceific EP1 subroutines when the USB_OTG_HS_DEDICATED_EP1_ENABLED define is uncommented in the usb_conf.h file.''

But in wich file do i find these ''

speceific EP1 subroutines'' and if the define can be out- or in- commented where do i pick up or send the data in each case?

Greetings,

Justus

jlchoobs
Associate II
Posted on April 20, 2012 at 10:55

I am analyzing the Code myself on the MSC.

But, I saw your answer when I analyzed the related USB CDC Example:

Look for cdc_DataTx() and cdc_DataRx() functions in the file: usbd_cdc.C

- The cdc_DataRx() calls the cdc_DataTx() to echo data back as default.

I had to modify these funcs in my Example Project in:

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/New Project Download - Virtual Com with Cmd Shell and ADC Reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F]New Project Download - Virtual Com with Cmd Shell and ADC Reading

[DEAD LINK /public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/STM32Discovery/New Project Download - Virtual Com with Cmd Shell and ADC Reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F]https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fNew%20Project%20Download%20%2d%20Virtual%20Com%20with%20Cmd%20Shell%20and%20ADC%20Reading&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F