DMA channel unexpectedly set active

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DMA channel unexpectedly set active

1,070 次查看
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.)

标签 (3)
0 项奖励
回复
1 回复

882 次查看
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 项奖励
回复