Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB CDC sends corrupted data in specifc circumstances #20

Open
renzenicolai opened this issue Apr 16, 2023 · 1 comment
Open

USB CDC sends corrupted data in specifc circumstances #20

renzenicolai opened this issue Apr 16, 2023 · 1 comment

Comments

@renzenicolai
Copy link
Member

In uart_task.c we use tud_cdc_n_read to read from the USB_CDC_ESP32. This function returns a length and places data into a buffer.

When connecting a terminal program (tested with screen) the tud_cdc_n_read returns garbage data, specifically some data that has previously been sent by the ESP32 to the RP2040, so it's data that was in the transmit buffer of the CDC interface. The tud_cdc_n_read actively writes to our buffer so this appears to be an SDK bug.

@renzenicolai
Copy link
Member Author

Relates to badgeteam/badgePython#25 as this garbage data is what is causing the ESP32 to crash (though the ESP32 should never crash when receiving garbage data, so there is another bug to be solved over at the ESP32 side).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant