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

SPI blocking or nonblocking?

Just to make sure: Will The spi_master_send_recv return when it is done writing and reading, or do you have to have some event wait functionality listening to SPI_MASTER_EVT_TRANSFER_COMPLETED ? I guess it is blocking because you have an output buffer as well...

I am going to do large burst reads having <= 24576 bytes. Is it even possible to read that much in one go memory wise?

Thanks!

Parents
  • The spi_master_send_recv function will only transmit first bytes to start the transaction and then return. This is non blocking.

    After the bytes are received for the transmitted first bytes then the rest of the transaction happens in the interrupt context. When the interrupt context has started for the first time you get a SPI_MASTER_EVT_TRANSFER_STARTED event and when the whole transaction is finished then you get SPI_MASTER_EVT_TRANSFER_COMPLETED event.

Reply
  • The spi_master_send_recv function will only transmit first bytes to start the transaction and then return. This is non blocking.

    After the bytes are received for the transmitted first bytes then the rest of the transaction happens in the interrupt context. When the interrupt context has started for the first time you get a SPI_MASTER_EVT_TRANSFER_STARTED event and when the whole transaction is finished then you get SPI_MASTER_EVT_TRANSFER_COMPLETED event.

Children
Related