Skip to main content
uilter
Senior
March 16, 2015
Question

Questions about endpoint service routines - STM32L151 USB Virtual Com Port

  • March 16, 2015
  • 1 reply
  • 488 views
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
This topic has been closed for replies.

1 reply

Amel NASRI
Technical Moderator
March 30, 2015
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 "Best Answer" on the reply which solved your issue or answered your question.