AnsweredAssumed Answered

DMA channel unexpectedly set active

Question asked by Joseph Dupre on Aug 11, 2016
Latest reply on Sep 14, 2016 by Carlos_Mendoza

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






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.)