Hi All,
I use KL26 as a 16-bit SPI slave device and DMA to move receive data.
So I need to access both SPI_DH and SPI_DL in one receive event.
My question is how to assign DMA Data Source address?
Because SPI_DH and SPI_DL has different address.
Is there any KL26 16-bit SPI slave example with DMA for reference?
Thank you.
Abby
Hi Abby Chen,
From the reference manual of KL26, you can use the FIFO mode FIFOMODE=1, just like the following:
You can set the address of DL as the source of your DMA, the DMA will read the data from the DH:DL automatically.
Now, we don't have the sample code of KL SPI DMA, you should do it by yourself.
Wish it helps you!
Have a great day,
Jingjing
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI Abby,
You can config ssize 16-bit and select DMA data transfers in 16-bit blocks .
Hope it helps
Alice