Other Parts Discussed in Thread: SYSCONFIG
Hello,
Currently I'm working on the configuration of EDMA to auto-transfer the result of ADC triggered by ADCINT with FREERTOS.
What I have done is as below:
1) Imported r5fss0-0_freertos project, and then in task_main, several periodic tasks, i.e. 1ms, 10ms, 100ms are created, it works well,
2) in task_main configured EPWM0 to trigger ADC0 SOC periodically, and in adc_app_ISR triggerd by EOC, the converted results are read by calling API ADC_readResult(), it works well.
The problem comes after:
3) I tried to add EDMA channel to transfer the result, I use almost the same configuration as in example adc_soc_continuous_dma, however, it doesn't work. The destination buffer is never updated.
I checked the register TPCC0, it looks the value of edmaParam is written correctly.
I tried to create edmaParam1, edmaParam2 and call API to link these two parameters, still not work.
what is worse, if I use following code to resister an interrupt function of DMA, the software will enter an abort, where I can't locate where the software is blocked during debuging. Without this interrupt register, the software can run, with EPWM and ADC working but DMA not woking.
/* Register interrupt */
intrObj.tccNum = tccAlloc0;
intrObj.cbFxn = &App_dmach0ISR;
intrObj.appData = (void *) &gEdmaTransferDoneSem;
status = EDMA_registerIntr(gEdmaHandle[0], &intrObj);
DebugP_assert(status == SystemP_SUCCESS);
My question is:
1) Is there an example implementing similar function to transfer ADC result using EDMA with FREERTOS running?
2) How to figure this issue out, where should I check to see if I miss something or everything is configured correctly?
3) Is it possible because of the conflict between several interrupts (adc_isr, dma_isr, RTI0) bringing the issue? Should I configure the priority of interrupts and how to make it through SysConfig?
Thanks a lot for your reply.
Lync