Preventing RX buffer overflow on the ESP8266
Posted: Wed May 13, 2015 3:08 pm
Yesterday I posted a question about generating interrupts when the UART buffers are full/empty on the ESP8266 (This is the link: http://www.esp8266.com/viewtopic.php?f=6&t=3042). Ideally, I would like to figure out a way to invoke this behavior, but I believe I figured out a work around for the time being.
When my uC is receiving data, I can set up an internal interrupt that pulls the data out of the register and into a software buffer - which would be simple to implement. My concern is in regard to the RX buffer on the ESP8266. My uC is considerably faster than the ESP8266, and I'm concerned about overwriting data in the buffer. I can certainly slow down the baud rate, but I would like to make it as fast as possible.
That said, does anyone know how quickly the data is transmitted once the module receives data? My module is running the NodeMCU Lua Interface, so everything is in terms of the API defined on their GitHub page. Unfortunately, I didn't see a function to check the TX/RX buffers.
When my uC is receiving data, I can set up an internal interrupt that pulls the data out of the register and into a software buffer - which would be simple to implement. My concern is in regard to the RX buffer on the ESP8266. My uC is considerably faster than the ESP8266, and I'm concerned about overwriting data in the buffer. I can certainly slow down the baud rate, but I would like to make it as fast as possible.
That said, does anyone know how quickly the data is transmitted once the module receives data? My module is running the NodeMCU Lua Interface, so everything is in terms of the API defined on their GitHub page. Unfortunately, I didn't see a function to check the TX/RX buffers.