Hi,
I made a code that read the ADC0 and transfer the data using the DMA channel 0. I can trigger the DMA by software, like in our example code, but now I would like to trigger the DMA channel with the ADC0_COCO flag.
- I've configured the ADC channel to enable the DMA request (DMAEN);
- I've configured the DMAMUX channel with this code :
void AdcInitDMAMUX (void)
{
PCC_DMAMUX0 |= PCC_IP_CGC(1); /* Enabling the clock on ADC1 channel */
DMAMUX_CHCFG0 &= ~ DMAMUX_CHCFG_ENBL(1); /* Disabling the DMA channel */
DMAMUX_CHCFG0 |= DMAMUX_CHCFG_SOURCE(40); /* ADC0 COCO is the source of the DMA0 channel */
DMAMUX_CHCFG0 |= DMAMUX_CHCFG_ENBL(1); /* Enabling the DMA channel */
}
- The configuration of the DMA channel is quite the same as in the example.
This is not working, the ADC0_COCO flag is set, but the DMA channel isn't triggered (when I use a software trigger, the DMA transfers the datas).
Dit I forget something to use the ADC_COCO to trigger the DMA ?
Thank you.