AnsweredAssumed Answered

K10 DMA channels fail to link

Question asked by billnd on Feb 5, 2014
Latest reply on Feb 7, 2014 by billnd

Hi all.

 

I'm linking 3 DMA channels, to run an ADC in ping pong mode, as described in app notes etc. PDB triggers the ADC, ADC in turn triggers the 1st DMA. 1st DMA reads data out of the ADC, links to the second DMA which loads the ADC source register. The second DMA, when reached major loop end, then links to a third that moves the data somewhere else for processing.

 

All seems to be OK most of the time, the system runs quite happily. Sometimes though, when making changes to seeming unrelated code, the DMA's fail to link consistently. For example, they will run as expected for thousands of ADC reads, many minor and major loops, then all of a sudden the first DMA fires but fails to link to the second one. This in turn causes a sequence error within the PDB.

 

The ADC time is short in comparison to the PDB trigger, so no timing issues there.

 

I'm stumped. Can anyone suggest where this maybe going wrong, or a way to effectively narrow it down, debug it, etc?

 

I'm running a K10, at 46Mhz, with IAR, and the latest MQX. At home just now, but will add configuration info, and code tomorrow when back at work. Just wanted to get this out there ASAP, as sometimes just a little clue can help see the wood for the trees.

 

Cheers in advance,

NDBill

Outcomes