spi_buf_set behavior

Hi,

I can't find any documentation for what the behavior is for the SPI API in Zephyr when the count of buffers in an spi_buf_set is > 1. In a transceive function, are they sent/received as pairs? Concatenated together?

Thanks

  • For Slave SPI. checking the code in ncs\v2.9.0\zephyr\drivers\spi\spi_nrfx_spis.c->transceive, it does not look like scattered buffers are supported

    else if ((tx_bufs && tx_bufs->count > 1) ||
    		   (rx_bufs && rx_bufs->count > 1)) {
    		LOG_ERR("Scattered buffers are not supported");
    		error = -ENOTSUP;

    For Master SPI, It is not clear, from the code. Easiest would be to do a quick test and see if it is a concatenated or two different transmit/receive pairs.

Related