DeltaSigma->FIR->IRQ works with interrupts, while DeltaSigma->DMA->FIR->IRQ  doesn't

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

   

I am having problems getting the DMA to work. 

   

My setup has the Delta Sigma to set to output 20bits.  I use the Delta Sigma irq to transfer the ADC result to the FIR channel A.  An IRQ atttached to the FIR triggers obtaining the results.  This works fine.

   

I attached a DMA to the eoc of the delta sigma. and set the DMA to transfer the ADC result to filter B FIR.

   

The DMA setup is:

   

#define DMA_BYTES_PER_BURST 3
#define DMA_REQUEST_PER_BURST 1
#define DMA_SRC_BASE (CYDEV_PERIPH_BASE)
#define DMA_DST_BASE (CYDEV_PERIPH_BASE)
 

   

DMA_Chan = DMA_DmaInitialize(DMA_BYTES_PER_BURST, DMA_REQUEST_PER_BURST,  HI16(DMA_SRC_BASE), HI16(DMA_DST_BASE));
DMA_TD[0] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_TD[0], 3, DMA_TD[0], 0);
CyDmaTdSetAddress(DMA_TD[0], LO16((uint32)ADC_DEC_SAMP_PTR), LO16((uint32)Filter_STAGEB_PTR));
CyDmaChSetInitialTd(DMA_Chan, DMA_TD[0]);
CyDmaChEnable(DMA_Chan, 1);
 

   

I can't  seem to get the DMA to transfer anything from the ADC to the filter.

   

I've been at this for a while, and can't seem to find anything that resolves my issue

0 Likes
4 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Have a look into this application note www.cypress.com/ It explains all the difficulties in using DMA.

   

In your example have a look at the incrementing of source and destination addresses.

   

 

   

Bob

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

There is actually a Cypress AN discussing how DMA can handle the 20bit results of the Delta-Sigma-ADC: http://www.cypress.com/?rID=44335

0 Likes
Anonymous
Not applicable

I have gone through the DMA use sheet, but now see that I failed to understand the impotant points it contains. 

   

It looks like the AN61102 will help me understand what I need to know

   

I will study this and apply it to my problem

   

Many thanks for the advise.

   

Stephan

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Welcome to the fascinating world of PSoC 🙂

0 Likes