AnsweredAssumed Answered

K60N512VMD100 DMA Continuous

Question asked by Cagri Fidan on Jun 23, 2011
Latest reply on Mar 21, 2012 by Wei Yan

I use MK60N512VMD100 Freescale microcontroler and TWR-K60N512 tower system.

 

I want to run ADC module with DMA.I can run ADC continuously mode, but i can't run DMA module continuously.

 

    DMA->TCD[5].SADDR=(uint32_t)&ADC1->R[0];
    DMA->TCD[5].SOFF=0;
    DMA->TCD[5].ATTR=DMA_ATTR_SMOD(0)|DMA_ATTR_SSIZE(2)|DMA_ATTR_DMOD(0)|DMA_ATTR_DSIZE(2);
    DMA->TCD[5].NBYTES_MLNO=0x00000080;
    DMA->TCD[5].DADDR=(uint32_t)&ADC_ConvertValue;
    DMA->TCD[5].DOFF=4;
    DMAMUX->CHCFG[5]=(DMAMUX_CHCFG_ENBL_MASK|DMAMUX_CHCFG_SOURCE(41));
    DMA->TCD[5].CSR|=1;

 

 ADC_ConvertValue must change, when ADC1->R[0] register change.But  ADC1->R[0] register is writed only once.DMA isn't working continuously.It is working single mode.

 

What can I do to make DMA module work continuously?

Outcomes