SHARC+ Using SPI in DMA mode


We are using SHARC ADSP-SC589 with IMU unit ADIS16362.

Data transfer between the IMU and the SHARC is via SPI.

We want to configure it to work as follows:

After each sample cycle (IMU), DIO1 pulses high, which provides a new data ready control signal for driving system level interrupt service routines.

We want to configure a trigger to a pDMA (peripheral DMA) via the TRU every time data is ready (DIO1).

The pDMA should transmit the data (register to read), receive the data (via adi_spi_ReadWrite? adi_spi_SubmitBuffer?),  trigger an interrupt to the core and wait for the next trigger from the IMU.

It would be even better if the DMA could have a buffer of ADI_SPI_TRANSCEIVERs to get a block of data before triggering an interrupt on the core - meaning the DMA will have a double buffer of let's say 10 transceivers on each and only after 10 samples accrued it will trigger an interrupt, while continuing transmitting and receiving data from IMU via the SPI.

I couldn't find an example showing how to configure SPI in a DMA mode. The 2 examples in 

"C:\Analog Devices\ADSP-SC5xx_EZ-KIT_Lite-Rel2.0.0\ADSP-SC5xx_EZ-KIT\Examples\drivers\spi"

don't use DMA mode with the SPI.

BTW, How should the adi_spi_SubmitBuffer be used? It is non-blocking, how can I get triggered when it is done?


Thanks in advance,