This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have been working on porting our 2812 code to the new 28377D and am currently setting up the base code.
I was setting up the ADC to trigger from the EPWMs and saw that if I wanted to read 16 channels with 4 on each ADC module all synchronized from a single EPWM trigger I could do it two ways:
I could setup each module to use the same SOCs 0-3 and trigger them all from the same EPWM.
I refer to this as cascading the SOCs.
I could setup each module to use the same SOCs 0-3 and trigger them in a burst starting from SOC0 with the same EPWM. I refer to this as burst mode of the SOCs.
I then setup an interrupt for a late interrupt on EOC3 to collect the data.
The cascading method works fine, the burst method is sampling at one fourth of the rate.
I setup the burst on ADC module A with (B,C and D are the same):
AdcaRegs.ADCBURSTCTL.bit.BURSTEN = 1; // Enable ADC burst mode
AdcaRegs.ADCBURSTCTL.bit.BURSTTRIGSEL = 5; // ePWM1, ADCSOCA will trigger burst of conversions
AdcaRegs.ADCBURSTCTL.bit.BURSTSIZE = 3; // 4 SOCs converted on burst
I also setup the channel select and acquisition window for each SOC.
Is there any advantage to one method over the other?
Any idea why the burst does not work as I thought it should?
Thanks...John
Hi John,
When you setup the ADC in burst mode with burst size of 4, then the first trigger will cause SOC0 to SOC3 to convert. The second will cause SOC4 to SOC7 to convert, the third will cause SOC8 to SOC11 to convert, the fourth SOC12 to SOC15, and the fifth will start at SOC0 again. This is where the 1/4th sample rate is coming form.
This functionality allows you to buffer more than 1 set of conversions...if you don't need all the conversions at once you can take advantage of the 1/4th rate of interrupts to free up some CPU bandwidth. Burst mode also allows for sampling different signals using the same trigger.
You can also adjust the SOC priority to make the burst mode only use 4 registers if that is the functionality that you want.
Thanks Devin,
I see that I was forgetting that the trigger select was being ignored in burst mode...John