I am doing externally triggered SPIM transfer on the Nrf52 using PPI.
I found that the NRF_SPIM_TASK_SUSPEND is a very power hungry operation as SPI suspend waits for the trigger majority of the time in a high power state. Then I continued to look into the "REPEATED" and "RX_POST_INC" flag for SPIM and hope to use that.
I have a data buffer of size N > 255 (uint8_t), and can segment that into data chunks that can be fitted into uint8_t such that M = N/segments.
Each external trigger calls for 2 bytes of SPI data read = K, using the "REPEATED_TRANSFER" flag I hope to be able to stop the transfer after each trigger is done (2 bytes) and increment RX counter until at least M is reached after a sequence of external triggers and then an interrupt calls for a handler and service it.
So, what is xfer_desc.rx_length for setting up SPIM? K or M or can be N for "REPEATED_TRANSFER? How to utilize the "LIST_MODE" - which should be designed to be even sweeter?
I have read this infocenter.nordicsemi.com/index.jsp
But need more detail how this is designed. Please advice with clarity. How the SPIM is setup, how the PPI could be used to trigger and suspend/stop and checks for when the RX count satisfied for the event NRF_SPIM_EVENT_ENDRX. Mockup code structures would be great!
Thanks!
FI