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

SPI master and DMA

Using softdevice s132, nRF52832 on a custom board

I don't quite understand how does the SPI work exactly?

I am using it on a battery powered low power sensor application, for this instance I have not set up a SPI event handler, but DMA is enabled.

I am calling nrf_drv_spi_transfer in a function, where I return the recieved data to the function that called it.

The SPI is running at 1mhz - so what is the CPU doing while waiting for the SPI slave to clock in the bytes?

Do I risk that I am working on memory that is not updated from the most recent info from the SPI peripheral device, or is the CPU waiting for the transfer to complete?

Should I set up the SPI event handler and instead signal my app to check the data after the event has indicated SPI transfer event is done - intuitively it seems like a better real-time/low power solution but this may already be sorted and abstracted away in the driver?

Parents Reply Children
No Data
Related