AnsweredAssumed Answered

DMA Interrupts Using Decriptors List Mode

Question asked by Ericles on Nov 19, 2010
Latest reply on Nov 22, 2010 by Ericles

Hi.

 

I' m using  the Blackfin 527 and I have some questions about the DMA in descriptor list mode. But, firstly pay attention in my description, please:

 

1) I have a circular buffer to receive data, it is divided in two slices: circ_buffer_slice_1 and circ_buffer_slice_2;

2) The descriptor is: typedef struct {void  *pNext; void  *pStart; short Config; short XCount; short XModify; short YCount; short YModify; } dma_desc_list;

3) The descriptors is configured as follow:

 

dma_desc_list Ping;

dma_desc_list Pong;


Ping.pNext = &Pong.pNext;
Ping.pStart = circ_buffer_slice_1;
Ping.Config = FLOW_LARGE | NDSIZE_7 | WDSIZE_8 | WNR | DMAEN | DI_EN;
Ping.XCount = 256;
Ping.XModify = 1;
Ping.YCount = 0;
Ping.YModify = 0;

Pong.pNext = &Ping.pNext;
Pong.pStart = circ_buffer_slice_2;
Pong.Config = FLOW_LARGE | NDSIZE_7 | WDSIZE_8 | WNR | DMAEN | DI_EN;
Pong.XCount = 256;
Pong.XModify = 1;
Pong.YCount = 0;
Pong.YModify = 0;

4) Using MDMA channel there is a source sending 4096 bytes to destination (circular buffer);
5) Also, there is an ISR to counter all interrupts generated when every slice of the buffer is filled.
Question 1) I hoped the counter inside the ISR equal 16 at the end of process, because 4096 bytes (sent by the source) / 256 (every slice of the buffer) is 16. But the counter just registred 1 interrupt. Why?
Question 2) How can I identify what slice of the buffer generated the interrupt?
What I don't understand is that using the same configuration explained above when I define the source to sending just 80 bytes and the receivers to 10 bytes I can check the count as hoped, i.e. I see the value 8.
Just for information my ISR is:
EX_INTERRUPT_HANDLER(ISR_MDMA)
{
*pMDMA_D1_IRQ_STATUS |= DMA_DONE;
count_isr_dma +=1;
}
I Thank you in advance.

Outcomes