Page 1 of 1

Do we need to "burst" (periodically toggle CS) to stream data to our ESP32S3 via SPI?

Posted: Sat Jul 11, 2026 1:24 am
by chris.f.rice
Hello there. We are using an STM32H7 as a SPI master connected to our ESP32-S3 as a slave. I've read over the documentation on how to code the ESP32 end, below:

https://github.com/hideakitai/ESP32SPISlave
https://docs.espressif.com/projects/esp ... slave.html

As far as I can see, the SPI slave API (eg spi_slave_queue_trans, spi_slave_get_trans_result) will not return any data until the slave is deselected (set CS to high). We are sending a large set of data, being forwarded by the ESP32-S3 over Wifi, more than can fit in a single buffer, so the only option I see is on the master, is to send the data N bytes at a time ("bursts" for lack of a better term) and then deselect-wait-select CS so that the ESP-IDF functions return the data and my application can forward the data, before resuming listening for the next "burst".

This is adding a fair amount of complexity -- not to mention slows things down -- and we are seeing problems, so I just wanted to confirm: is this the way? Do we need to "burst" data (ie periodically toggle CS) in order to stream data to the ESP32S3 via SPI?

Re: Do we need to "burst" (periodically toggle CS) to stream data to our ESP32S3 via SPI?

Posted: Sat Jul 11, 2026 2:49 pm
by MicroController
I can't seem to find a good answer as to if/how "continuous" transfer is supported in slave mode.

An SPI transaction ends when either /CS is pulled high or when the corresponding RX buffer is full.
My suggestion is to test how this is handled by enqueuing two (or more) transactions and check whether the second transaction 'executes' even when /CS stays low. (Note that you likely won't be able to transfer more than 32KB (2^18 = 256k bits) per transaction in any case.)