No callback from DMA LPC55Sxx

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

No callback from DMA LPC55Sxx

1,311 Views
jreh
Contributor I

Hi,

Using DMA0 for requests from High Speed SPI, Flexcomm8, and triggering from CTIMER2 MR[0].  The timer/match register[0] is set up to occur every 10uS, which triggers the DMA to load one SPI write.  The code is lifted from the SDK.  This is working from a single write to thousands ie. thousands of SPI writes occurring every 10uS for duration of the DMA byte count.  I have a couple questions;

1.) I don't get a callback.  I've put a PRINTF there, also a breakpoint, neither is executed.  This line is executed everytime the DMA is set up to go;

DMA_CreateHandle( &DMA0_CH3_Handle, DMA0, DMA0_CHANNEL_3 );

Any ideas?

2.) I've enabled INTA for DMA0.  It triggers at the end of the transfer, but the time relative to the last transfer seems to be a function of how many bytes are transferred. Sometimes it executes 1uS after the last transfer and some times it's 30 uS.  I need a accurate delay after the last transfer.  Any ideas what is causing the random timing of INTA?  It seems to be consistent for a range of transfers, so I'm assuming that it's not ISR jitter?

3.) When I look at the DMA interrupt status register, DMA0->INTSTAT it reads 0x02 which is the ACTIVEERRINT bit.  I then read DMA0->ERRINT0 = 0x00 which states "error interrupt not active".  So is there an error?  If so how can I determine what is causing the error?

 

Thanks

Jeff

 

0 Kudos
5 Replies

1,299 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @jreh ,

We have some examples for the LPC55Sx SPI with DMA in our SDK I due recommend to give a look in to this examples they can help you out to review if something is missing in the configuration. Please let me know if you have any other question.

0 Kudos

1,297 Views
jreh
Contributor I

Thanks.  As stated in my original post, I used your examples as the starting point for the code and the DMA is working as expected, except there's no call back when done. I had 2 other questions in the original post.

0 Kudos

1,273 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @jreh ,

 

Thank you for the information. Can you please help me with the example were you notice that the callback DMA_CreateHandle is not executed? So I can replicate the issue.

0 Kudos

1,270 Views
jreh
Contributor I

Example is lpcxpresso55s69_dma_dma_memory_to_memory,

 

Thanks

0 Kudos

1,233 Views
nxf77486
NXP TechSupport
NXP TechSupport

Hello @jreh ,

I tested the DMA example you share and as you mention there is no problem with the transfer callback. We do have an SDK examples

spi_HS_LSPI_dma_b2b_transfer_master

 spi_HS_LSPI_dma_b2b_transfer_slave

For HS SPI can you please try this with your configuration and individually to see if you have any problem.

0 Kudos