KL26 as SPI Slave (DMA)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KL26 as SPI Slave (DMA)

871 Views
abby
Contributor I

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

Tags (3)
0 Kudos
2 Replies

444 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Abby Chen,

    From the reference manual of KL26, you can use the FIFO mode FIFOMODE=1, just like the following:

pastedImage_0.png

    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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

444 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

HI Abby,

You can config ssize 16-bit and  select DMA data transfers in 16-bit blocks .

Hope it helps

Alice

0 Kudos