AnsweredAssumed Answered

Initiating SPI transfer with GPIO and moving data without CPU involvement.

Question asked by Logan Witter on Jun 18, 2019
Latest reply on Jun 18, 2019 by jeremyzhou

I'm working with an i.MX RT1020 processor connected to an external SPI device. This external device contains a "data ready" pin which can be used as an input to the processor. I would like to use this pulse as a trigger mechanism to initiate a SPI transfer. Following the SPI transfer I would like to break up the received data and place it in my own data buffer. This process is laid out in the following figure:



Successive trigger events would place the data in the following way ( actual samples are different colors to show a different SPI transfer has occured ):




After reading through some of the RT1020 documentation, I'm fairly certain that all of this can be accomplished with DMA transfers ( and maybe some XBAR setup ). I've broken the process up into three steps labelled A, B, and C. All these events will chain off of one another. I think B and C will be as simple as setting up DMA channels. But I'm still not sure how process C would be triggered in that scenario. Is there a "SPI transfer done" flag that can be used to chain to the next DMA transfer?


What about process A? I think this involves a XBAR assignment which connects the GPIO to a DMA request signal. But I'm having a hard time finding software examples of this.


i.mxrt1020 edma xbar lpspi master