cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with sending more than 16Kbytes of data with CDC_Transmit_FS.

pass3master
Senior

We are trying to send serial data from an ST microcontroller to a PC using CDC_Transmit_FS.
We can send data less than 16Kbyte (4096 * 4byte) without any problem, but when we try to send larger size, sometimes we get USBD_STATUS_CANCELED (confirmed by Wireshark + USBpcap).
Could you please tell us why the above behavior occurs?

10 REPLIES 10

I did not suggest any dynamic priority changes. In my projects, for starting USB In transfers I always use a software-generated interrupt of the same priority as USB hw one. Anyway, to interact with this interrupt, the interface routine called from lower priority must disable all ints for 2 lines of C code.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice