Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This may be due to my own lack of understanding, but I have found a problem with USB CDC serial transmission from device to host after the host has gone to sleep and then resumed (Host is WIndows 10 PC). My device sends a steady stream of traffic to a custom application on the host. My device code is careful to check the return value of tud_cdc_write, and if not all data has been written, to wait for tud_cdc_tx_complete_cb to proceed. If I set my block size lower than CFG_TUD_CDC_TX_BUFSIZE, then when the PC resumes from sleep, the PC application continues to receive data from my device as usual. If my block size is larger than CFG_TUD_CDC_TX_BUFSIZE, then before sleep things work great because the tx fifo is set to non-overwritable, but after resume from sleep, the tx fifo becomes overwritable, and thus tud_cdc_write discards data when passed these large buffers. Perhaps I need to be explicitly handling the resume callback and doing something that will set overrwritable back to false?
Beta Was this translation helpful? Give feedback.
All reactions