Other Parts Discussed in Thread: CONTROLSUITE
I wonder if anyone can give me some advice on ADC setup in a F28377S?
This is what I want to do: Upon an ePWM trigger I want the ADC to start converting two simultaneous channels at the maximum rate for 1000 samples, the resulting 1000 conversions ending up in a buffer in RAM at the end of it all.
The way I’m thinking is this (I describe a single ADC module and will set up both modules the same to get two synchronously sampled inputs):
-
Set up SOC0 to trigger from the ePWM source
-
Set up the remaining SOCs to trigger from SOC0 EOC
-
Also set up an PIE interrupt from the same ePWM source.
-
Set up DMA to transfer out results 0-7 upon the EOC of SOC7, and results 8 thru 15 upon the EOC of SOC15
-
In the ISR for the ePWM interrupt change the trigger source of SOC0 to the SOC15 EOC
-
Set up another PIE interrupt from DMA that will activate after the required 1000 words have been transferred
-
In the ISR for this, stop the ADC converting and process the data.
Will this work? Is there an easier way to get where I’m going? I’m uncomfortable with the use of the ePWM ISR to reprogram the SOC0 trigger, this needs to be complete before SOC15 EOC, which will be about 4.7µs after the initial ePWM trigger.
Thank you.
John Wilkes.
