This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[NRF52840] SPI and SPIS example!

I am working with SPI and SPIS examples ( sdk version 13). SPI of nrf52 is full duplex. In the example, I can send data from Master board to Slave board then Master board will receive response data from Slave board. if Master board does not send data to Slave board, Slave board will not send data to Master board. But I want Slave board can send data to the Master board without Master board send data to Slave board. Can I do that and how? Please help me!!!

Parents
  • No you can't do that. SPI's clock is controlled by the master. If it's not clocking, no data flows, that's just the basic definition of the protocol.

    The master can clock out null data constantly if it wants to read from the slave and work out if there is valid data, but that's it, the slave can't initiate a transfer in SPI. If you want to get clever and have the slave raise a separate interrupt when it has data it wants to send, you could do that, but still the master needs to drive the actual transfer of SPI data.

Reply
  • No you can't do that. SPI's clock is controlled by the master. If it's not clocking, no data flows, that's just the basic definition of the protocol.

    The master can clock out null data constantly if it wants to read from the slave and work out if there is valid data, but that's it, the slave can't initiate a transfer in SPI. If you want to get clever and have the slave raise a separate interrupt when it has data it wants to send, you could do that, but still the master needs to drive the actual transfer of SPI data.

Children
Related