DMA channel unexpectedly set active

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

DMA channel unexpectedly set active

723 Views
jdupre
Contributor II

I'm following the UART DMA example in LPCOpen for the LPC15xx.

I have a descriptor that looks like this:

/* Descriptor for the channels we need */

dmaRXDesc[0].source = DMA_ADDR(&LPC_USART0->RXDATA);   

dmaRXDesc[0].dest = DMA_ADDR(&RxBuf[0] + RX_BUF_SIZE - 1);

dmaRXDesc[0].next = DMA_ADDR(NULL);

dmaRXDesc[0].xfercfg = DMA_XFERCFG_SETINTA

| DMA_XFERCFG_WIDTH_8

| DMA_XFERCFG_SRCINC_0

| DMA_XFERCFG_DSTINC_1

| DMA_XFERCFG_XFERCOUNT(RX_BUF_SIZE);

When I call

Chip_DMA_SetupChannelTransfer(LPC_DMA, DMAREQ_USART0_RX, dmaRXDesc[StartDescIdx].xfercfg);

the active flag for the channel gets set immediately.  I don't understand this.  If I haven't set DMA_XFERCFG_CFGVALID, shouldn't I have to do something else to make the channel active?

I want to do all the DMA configuration in advance, and then have the UART ISR trigger the pre-configured DMA transfer to start. (I'm monitoring RXBRK and RXDELTABRK in the UART ISR to control when the DMA transfer should start.)

Labels (3)
0 Kudos
Reply
1 Reply

535 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Joseph,

Apologies for the delay, are you still having problems with the DMA?


Thanks in advance for your response!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos
Reply