I-Enviroment
MPC5746R development with S32DS and S32SDK. I want to use ADC with DMA. ADC0 Channel 0-7 and 20-25,totally 14 channels works in normal chain, software start, scan conversion mode. DMA major loop is 8, totally 14*8=112 results.
II-Problem
Channel results are not physical address consecutive,I don't know how to set DMA source address. I come up with 3 solutions:
1.SARADC0 Trigger 2 DMA channels, one transfer ADC Ch0-7 results, the other transfer Ch20-25 results. Is this method possible? But if the ADC ch is 1\2,4\5,7\8....., I need to used mutiple DMA Chs.Maybe this mehod is not good enough.
2.SARADC0 convert channle 0-25, and DMA starts after ADC normal chain. This method extends the time required for ADC and uses more ram for results buffer.
3.Enable ADC End of Chain ISR. In the ISR call back, i call SDK function for example ADC_DRV_GetConvResultsToArray, save adc results from ADC Reg to system RAM. and start DMA by software, transfer data from System RAM to finally Buffer. But this method requires CPU intervention.Is this method possible?
III-Questions
1.Is there any other good method or anyone of the 3 above is ok?
2.What's the meaning of ADC Register: ADC_DMAE and ADC_DMAR0-2. Whether the conversion results that need to be accessed by DMA need to be set in the DMARx register. And DMA Triggerd ty ADC end of normal chain?