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.
Hi,
In my application , i need to creating a continuous stream of conversions with one adc channel, then do a continuous stream of other adc channel
ADCINA0 --SOC0 SOC1 SOC2 SOC3,
ADCINA1 --SOC4 SOC5 SOC6 SOC7,
AdcRegs.INTSEL1N2.bit.INT1E = 1; //Enable ADCINT1
AdcRegs.INTSEL1N2.bit.INT1CONT = 1; //enable ADCINT1 Continuous mode
AdcRegs.INTSEL1N2.bit.INT1SEL = 1; //setup EOC1 to trigger ADCINT1 to fire
AdcRegs.ADCSOC0CTL.bit.CHSEL = 0; //set SOC0 channel select to ADCINA0
AdcRegs.ADCSOC0CTL.bit.TRIGSEL = 5; //set SOC0 start trigger on EPWM1A
AdcRegs.ADCINTSOCSEL1.bit.SOC0 = 1; //ADCINT1 will trigger SOC0
Cla1Regs.MPISRCSEL1.bit.PERINT1SEL = CLA_INT1_ADCINT1; //CLA task1 Response to ADCINT1
SOC0-SOC3 have same config.
SOC4-SOC7 take the same way ,except use ADCINT2, and adc trigger source is EPWM2A, exe CLAtask2;
Through the above configuration,when EPWM1A triggers, SOC0-3 convert in a continuous stream mode.When enough samples are taken,set a cla isr flag, CPU response interrupt and config for SOC4-SOC7 then EPWM2A trigger ADC convert .
The alternate sampling of channel ADCINA0 and channel ADCINA1 is realized,
1. Is this method ok?
2.Is there any other way to make it easier?
2.Whether it can be realized without CPU interrupt?
thanks in advance.
Soldier 76 said:In my application , i need to creating a continuous stream of conversions with one adc channel, then do a continuous stream of other adc channel
Can you describe your requirements for the continuous stream of conversions? How many samples do you require and at what sampling rate? Do the samples need to be paced at a known frequency with minimal jitter (for FFT analysis) or is the goal to over-sample (filter out noise)?
Hi,tlee
thanks for your kind help
the singnal that docontinuous convernsion have a period about 50us, ACQPS is set to 7 cycles Sample window , so, it will be about 150 sample points, after one period sample, the other channel also converted use the same way.
PWMA falling edge need to trigger every convert per three Event。
thanks for your kind help
Soldier 76 said:1. Is this method ok?
Yes, this method should be possible. The CLA will need to transport the results to a memory buffer until all 150 conversions are done.
Soldier 76 said:2.Is there any other way to make it easier?
This is probably the most system-efficient method for F2803x devices. Newer devices such as F28004x and F2837x will have additional resources like DMA and CLA access to ADC configuration registers that can help out. The older F2806x and F2833x may also have some advantages over F2803x with a DMA and faster CPU frequency.
Soldier 76 said:2.Whether it can be realized without CPU interrupt?
Not entirely. The CLA cannot access the ADC configuration registers so the C28x will still be required to configure the continuous sampling settings. You can refer to the continuous sampling example in the AdcConversion() function from C2000Ware \device_support\f2803x\common\source\DSP2803x_Adc.c