SPI Slave transmit function
Posted: Mon Feb 27, 2023 5:23 pm
I am in the function with the maximum delay waiting for the master to send me data in order to send him the data stored in sendbufer in response. But while I was waiting, I decided to change the data in sendbufer. The question is what data will go to the master new or previous.
Task1
t.length=128*8;
t.tx_buffer=sendbuf;
t.rx_buffer=recvbuf;
ret=spi_slave_transmit(RCV_HOST, &t, portMAX_DELAY);
Task2
sendbuf[0] = 0xA5;
...
Task1
t.length=128*8;
t.tx_buffer=sendbuf;
t.rx_buffer=recvbuf;
ret=spi_slave_transmit(RCV_HOST, &t, portMAX_DELAY);
Task2
sendbuf[0] = 0xA5;
...