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

Is it possible to do back to back SPI transfers or read only during RX time?

I need to write received data from SPI to address pointed by a parameter. When doing a transfer, spi drivers also read the data sent by slave during TX. I know this is normal since SPI is full-duplex protocol. However, I have strict time constraints so I can't copy read data between buffers (I've done this and it worked but the performance wasn't great). Also, I can't use pointer arithmetics since buffer is elsewhere. I thought that if I could make TX - RX transfer back to back seperately, I can solve this problem. Is there a way to do this or do I have an alternate solution?

Parents
  • From the SPIM — Serial peripheral interface master with EasyDMA specs:
    The .PTR and .MAXCNT registers are double-buffered. They can be updated and prepared for the next transmission immediately after having received the STARTED event.

    There's also the EasyDMA list, that allows you to fill any number of buffers in the same transfer. 

     
    When doing a transfer, spi drivers also read the data sent by slave during TX. I know this is normal since SPI is full-duplex protocol. However, I have strict time constraints so I can't copy read data between buffers (I've done this and it worked but the performance wasn't great).

     What exactly do you mean? Are you only using one buffer each for TX and RX?

Reply
  • From the SPIM — Serial peripheral interface master with EasyDMA specs:
    The .PTR and .MAXCNT registers are double-buffered. They can be updated and prepared for the next transmission immediately after having received the STARTED event.

    There's also the EasyDMA list, that allows you to fill any number of buffers in the same transfer. 

     
    When doing a transfer, spi drivers also read the data sent by slave during TX. I know this is normal since SPI is full-duplex protocol. However, I have strict time constraints so I can't copy read data between buffers (I've done this and it worked but the performance wasn't great).

     What exactly do you mean? Are you only using one buffer each for TX and RX?

Children
Related