usb_cdc: export receive window for host flow control#7265
Conversation
|
-deleted not relevant- |
|
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available. Best regards, PS: I'm just an automated script, not a human being. |
This PR matches the behavior already used by the UART and CAN serial transports, which expose their MCU-side receive window to the host so that Klipper can throttle outstanding command data appropriately.
Hardware / Reproduction Setup
This was tested on:
Issue I had:
During normal prints, the main MCU connection would sporadically enter phases where
bytes_retransmitincreased rapidly and eventually caused a shutdown.bytes_invalidstayed at zero, and the EBB connection did not show the same behavior.After fix applied:
After exporting
RECEIVE_WINDOWfor USB CDC, the same print workload passed the previous retransmit escalation window without the main MCU retry counter rising.