AnsweredAssumed Answered

Questions about endpoint service routines - STM32L151 USB Virtual Com Port

Question asked by Witte on Mar 16, 2015
Latest reply on Mar 30, 2015 by Amel N
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.

Outcomes