I hope this information can be useful to other developers.
This information applies to USB CDC driver found in ASF. I experienced the issue with release 3.8.1.
As you know, ASF allows you to define callback functions for various USB events. One of them is UDI_CDC_RX_NOTIFY, called when new data arrives from the USB.
If you attempt to send too much data while executing that callback function, the USB driver freezes.
"Too much" depends from the size of the USB TX buffer, defined in udi_cdc.c
COMPILER_WORD_ALIGNED static uint8_t udi_cdc_tx_buf[UDI_CDC_PORT_NB][UDI_CDC_TX_BUFFERS];
If you comment out
Then the buffer becomes 64*2*5 = 640 bytes.
If you need to send more data, then you have to manually modify udi_cdc.c
In my opinion, this is a design mistake, but after a long ping-pong of messages, Atmel Support still insists this is a "normal" behaviour.
I wonder if this happens with LUFA as well :roll: