I've been debugging my code using Serial for over a week wondering why it was not working.
Only today I found out it is due to default 64 byte receive buffer size.
When teensy is sending a large amount of data, and not reading, and during this time the teensy keeps receiving serial data beyond 64 bytes, it turns out the oldest data is overwritten!!
I got my program to work by increasing the receive buffer size to 1024, but wondering if there is a way to make teensy serial stop receiving data when receive buffer is full.
This is serial communication between teensy and esp8266 wifi. This is while sending 2k of data using buffered write, by the time write is finished, and I do a read, the data I get is 64 bytes and there is a lot of missing data.
Thanks
Only today I found out it is due to default 64 byte receive buffer size.
When teensy is sending a large amount of data, and not reading, and during this time the teensy keeps receiving serial data beyond 64 bytes, it turns out the oldest data is overwritten!!
I got my program to work by increasing the receive buffer size to 1024, but wondering if there is a way to make teensy serial stop receiving data when receive buffer is full.
This is serial communication between teensy and esp8266 wifi. This is while sending 2k of data using buffered write, by the time write is finished, and I do a read, the data I get is 64 bytes and there is a lot of missing data.
Thanks