Search found 2 matches

by wolfbert
Tue Nov 15, 2022 9:52 am
Forum: ESP32 Arduino
Topic: Understanding UART receive buffering
Replies: 2
Views: 9530

Re: Understanding UART receive buffering

Thank you for your explanation. It made me rethink my assumptions (I was used to AVR controllers), and I believe I've figured it out.

The ring buffer is of course used. But, while a transmission is ongoing, and with default settings, the first non-zero result of available() will be 120 - the first ...
by wolfbert
Mon Nov 14, 2022 8:45 pm
Forum: ESP32 Arduino
Topic: Understanding UART receive buffering
Replies: 2
Views: 9530

Understanding UART receive buffering

Hi,

I'm receiving a 262 282 byte data packet (sent in one piece) on an ESP32 (2400 baud, 8N1) like so:


void setup()
{
Serial.begin(115200);

Serial2.setRxBufferSize(512);
Serial2.begin(2400);
}

void loop()
{
uint8_t buffer[512];
size_t bytesRead;

while(!Serial2.available());
bytesRead ...

Go to advanced search