MK64 SPI DMA Receive in Master mode - Impossible?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MK64 SPI DMA Receive in Master mode - Impossible?

1,114件の閲覧回数
eyaldoron
Contributor II

In the K64, SPI1 and SPI2 have only a single DMA trigger source. As far as I can see, this means you can't operate both a transmit and a receive DMA at the same time. In particular, this means that a DMA receive in Master mode is impossible, since it always requires a transmit channel. Is this true? It seems like a significant step back from, say, the K60, where all SPI channels have separate TX and RX DMA triggers.

Any workaround, except to use polling or interrupts?

Thanks,

Eyal Doron

ラベル(2)
0 件の賞賛
返信
2 返答(返信)

854件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Eyal,

According to the reference manual, the SPI1 and SPI2 only support one trigger source at the same time, then it means that it's unable to transfer the data through the DMA mechanism.

And I'd like to suggest that you can choose the interrupt to instead of the DMA.
Have a great day,
Ping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

854件の閲覧回数
eyaldoron
Contributor II

Its been a long time, but I found a sort of solution

For transmit I now use a DMA channel triggered from a timer, instead of from the SPI peripheral. This works since the SPI timing is deterministic. The only disadvantage, except for locking down a timer, is that the transfer is slightly slower since I allow some slack

0 件の賞賛
返信