SPI Tx & Rx Buffer Sizes
Posted: Mon Aug 12, 2019 8:22 am
I have the ESP32 set up as a slave device using SPI as the communication protocol. As such the ESP32 listens for commands from the controller and sends responses to the controller. This means that the ESP is either in receive only mode (when listening) or send only mode (when responding). The clock is of course generated by the controller.
So lets say that the controller wants to send 40 bytes of command data to the ESP32. I obviously need a rx_buffer setting up but do I need a tx_buffer as well?
Similarly, when the ESP is responding, do I need both buffers or can I just supply a tx_buffer?
I am trying to keep heap usage as low as possible and some messages could be large. I do not want to allocate say 10K for a rx_buffer when I am not going to receive anything other than 0x00 when the ESP is sending 10K of data to the controller.
Thanks in advance,
Mark
So lets say that the controller wants to send 40 bytes of command data to the ESP32. I obviously need a rx_buffer setting up but do I need a tx_buffer as well?
Similarly, when the ESP is responding, do I need both buffers or can I just supply a tx_buffer?
I am trying to keep heap usage as low as possible and some messages could be large. I do not want to allocate say 10K for a rx_buffer when I am not going to receive anything other than 0x00 when the ESP is sending 10K of data to the controller.
Thanks in advance,
Mark