hi Hui_Ma
so took example from SDK and tried to configure to scan ADC using ADC major and minor loops. i took pdb adc and ADC_DMA example from SDK_2.3 for K64 controller available, so tried to modify pdb example to work in mode as described in AN4590SW example.
so initially i have configured ADC for channel and in DMA0 buffer i have given ADC channel 1 with two dma as per above example. but first to start DMA i have to trigger dma by adding below lines.
edma_config_t userConfig;
EDMA_GetDefaultConfig(&userConfig);
EDMA_Init(DEMO_DMA_BASEADDR, &userConfig);
EDMA_CreateHandle(&g_EDMA_Handle, DEMO_DMA_BASEADDR, DEMO_DMA_CHANNEL1);
EDMA_SetCallback(&g_EDMA_Handle, Edma_Callback, NULL);
EDMA_PrepareTransfer(&g_transferConfig, (void *)ADC16_RESULT_REG_ADDR, sizeof(uint32_t),
(void *)ui_adc_result, sizeof(uint32_t), sizeof(uint32_t),
sizeof(ui_adc_result), kEDMA_PeripheralToMemory);
EDMA_SubmitTransfer(&g_EDMA_Handle, &g_transferConfig);
/* Enable interrupt when transfer is done. */
EDMA_EnableChannelInterrupts(DEMO_DMA_BASEADDR, DEMO_DMA_CHANNEL1, kEDMA_MajorInterruptEnable);
/* Enable transfer. */
EDMA_StartTransfer(&g_EDMA_Handle);
when i put a break point in DMA call back i got some values and in ADC register ADC channel was set to 0 which was done during ADC initialization.
so my question was like to trigger second DMA which is responsible to change ADC channel do i need to do anything else apart from what is given in AN4590SW example.