cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about endpoint service routines - STM32L151 USB Virtual Com Port

uilter
Senior
Posted on March 16, 2015 at 02:32

Hello everybody,

I'm new with USB devices and I want to develope a Virtual Com Port with STM32L151. I get a example named VirtualComport_loopback for IAR in the packet STM32_USB-FS-Device_Lib_V4.0.0.

I have some questions about this example... 

1) Archive usb_endp.c

What is the aim of the function EP3_OUT_CallBack()?

I tested the function , and saw what every char I received from the USB Host this function is called, where the char is saved in RAM memory, however always in the first position of the array Receive_Buffer[64]. Is it correct?

2) Archive hw_config.c

I didn't understand very well the function CDC_Receive_DATA()... inside of this function, there is a function SetEPRxValid(ENDP3), what's the objetive of this line?

3) Others EPx_IN/OUT_CallBack functions

About the others EPx_IN/OUT_CallBack functions, what is the purpose of them?

In the example VirtualComport_loopback, the FW use just the EP3_OUT_CallBack and EP1_IN_CallBack.

Thank you very much.

#cdc #stm32 #virtual-com-port #usb #vcp
1 REPLY 1
Amel NASRI
ST Employee
Posted on March 30, 2015 at 11:40

Some details on the

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/user_manual/CD00158241.pdf

(STM32 USB-FS-Device development kit).

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.