You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When receiving image buffers over UART on a Teensy 4.1 at 916200 BAUD from an ESP32-Cam nearly all images become corrupted. Corrupted images contain a valid first portion of 1/4 to 3/4 of the image with the remaining portion being the previous image.
The UART uses the addMemoryForRead() method to add 100k PSRAM to the RX buffer and typical image size is 25k.
Images are sent to the Teensy on demand and between image request the clear() method is called to ensure a empty UART RX buffer.
The below workaround allows for uncorrupted images:
Inside the clear() method in the file HardwareSerial.cpp...
Remove: rx_buffer_head_ = rx_buffer_tail_;
Add:
rx_buffer_head_ = 0;
rx_buffer_tail_ = 0;
Nothing obvious sticks out when looking at the read() method concerning the ring buffer.
The text was updated successfully, but these errors were encountered:
When receiving image buffers over UART on a Teensy 4.1 at 916200 BAUD from an ESP32-Cam nearly all images become corrupted. Corrupted images contain a valid first portion of 1/4 to 3/4 of the image with the remaining portion being the previous image.
The UART uses the addMemoryForRead() method to add 100k PSRAM to the RX buffer and typical image size is 25k.
Images are sent to the Teensy on demand and between image request the clear() method is called to ensure a empty UART RX buffer.
The below workaround allows for uncorrupted images:
Inside the clear() method in the file HardwareSerial.cpp...
Remove:
rx_buffer_head_ = rx_buffer_tail_;
Add:
Nothing obvious sticks out when looking at the read() method concerning the ring buffer.
The text was updated successfully, but these errors were encountered: