cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4 USB VCP Receive Buffer Issue

Sunny T
Associate
Posted on September 25, 2017 at 19:41

Hi,

I am using STM32L4 Discovery board, I have generated USB VCP code from cube MX and configured as CDC class in Device mode. I am facing an issue with Receive buffer, I don't understand the issue. If host send data more than 8 bytes to device, my code get hangs. Is there any Limitation in RX buffer. Could Some one suggest how to overcome this issue. I have attached the reference document which used to generate code in CUBEMX.

Thanks 

#stm32l4-usb
2 REPLIES 2
Posted on September 25, 2017 at 22:00

hello!

Put a Break inside CDC_Receive_FS(..) to observe where the problem is.

The Rx buffer is configured inside CubeMx.

0690X00000608NHQAY.png

Regards

vf

Posted on September 25, 2017 at 22:09

>>Is there any Limitation in RX buffer. 

Presumably you have all the source code, it can't be that intractable, dig a little.

Cube/HAL seems to like to have blocking code, and remember call-backs stall the system, so do minimal work, buffer or whatever, and leave quickly.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..