LPSPI and DMA Help

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

LPSPI and DMA Help

432 Views
kamal1
Contributor III

Hello, I am using the MIMXRT1050 board with Keilv5 Pro edition.

 

I am working on a custom project and need help configuring my LPSPI and DMA. My goal is the use DMA to send 160 bytes to the transmit buffer of LPSPI. I have a area of memory where the data is stored. My function will take in the start address of the data and size of data as parameters.

 

I want to use DMA to send the data to the transmit buffer of the LPSPI. I see there is a special LPSPI_EDMA functions, but I am confused on how to set these API functions for my specific case. All the examples involve a master and slave board. In my case, I will be moving data from memory to the LPSPI TX buffer.

 

My understanding is if I use DMA and set the watermark of the FIFO to 2 words, I will be able to send2 words to the transmit buffer then the transmit buffer will be full and send out those words and return empty to take in the next 2 words until the DMA is complete.

 

How can I use the LPSPI_EDMA to send data from stored memory to the LPSPI TX buffer?

 

Any help is appreciated.

Best,

Kamal

0 Kudos
1 Reply

410 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi Kamal,

I sent you a response to the case you submitted internally about this. If you have any input please let me know.

Regards,

Felipe

0 Kudos