I am learning to use a MK66FX1M0VMD18 (teensy 3.6).
My goal is to record datas from 8 analog inputs converted with the ADC0 and ADC1.
I read the "K66 Sub-Family Reference Manual".
Now I wonder if the following idea is possible :
The PDB would be in continuous mode and its two channels 0/1 would trigger in parallel :
- ADC_0_A which thanks to the back to back mecanic, would trigger ADC_0_B
- ADC_1_A " " " ADC_1_B
At this point I would dispose of a set of four results in ( RA0 RB0 RA1 RB1) that I could transfer with DMA, in a circular buffer...
This DMA transfere would be triggered , for exemple, by the end of conversion of ADC_1_B.
This DMA would it turn trigger through the "link" mecanism, another dma channel which would copy in the right registers of the ADCs (ADCx_SC1n), the adresses (ADCH) of four new data sources. Lastly using " scatter/gather " the TCD of this last DMA channel would be updated in order to toggle between analog inputs 1..4 and 5..8.
And so on . . .
Theoretically it seems possible... but there are probably so many pitfalls to avoid, that I wish to get your advices and warning, before diving in...
Sorry for my bad english.