Hello, I have an issue with sequential ADC sampling;
C2000 DSP: F28035.
First of all here is the setup for my ADC acquisition:
ADCINT 1 is configured with SOC1, SOC2 and SOC3, which is triggered by PWM1 (Master) at a continuous 25kHZ rate.
ADCINT 3 is configured with SOC4, SOC5 and SOC6, which is triggered by PWM3 (Slave) at a continuous 25kHZ rate. PWM3 has a 120 degrees phase compared to PWM1.
ADCINT5 is configured with SOC7, SOC8and SOC9, which triggered by PWM5 (Slave) at a continuous 25kHZ rate. PWM3 has a 240 degrees phase compared to PWM1.
The sampling process is started by a CMPB event at a 1500 clock cycle (2400 cycles = 25 kHZ with 60Mhz processor).
I use an acquisition window of ACQPS = 6 for all the channels.
Everything works fine with this setup, and I first get problems when I add another channel for sampling:
ADCINT7 is configured with SOC10, which is triggered by PWM7 (Slave) at a continuous 300 kHZ rate. ACQPS=6. Period=199 (you can read topic: http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/247130.aspx
PWM7 is phase enabled so that the ADC sampling will not overlap with ADCINT1, 3 and 5.
Also I use early interrupt pulse for ADC configuration:
AdcRegs.ADCCTL1.bit.INTPULSEPOS = 0;
Theoretically I should not have any problems with ADC overlap if this is true:
The conversion and sampling process for ADCINT1, 3 and 5 takes 46 cycles. (refer to Figure. 34 p.40 SPRUGE5D).
The conversion and sampling for ADCINT7 is 7 ADCCLKs sampling + 13 ADC Clocks conversion. (20 in total).
So the ADCINT7 is more frequent than the other ADC interrupts, at a rate of 300kHz, and with phase enable it should be possible to have sequential sampling without any overlap, because the total sampling time will be 46 cycles + 20 cycles, where there will be 8 ADCINT7 interrupts in a cycle of 1 ADCINT1 interrupt.
There is unfortunately an issue, where I can see that 25kHz is been modulated in my 300kHz control algorithm. Im not sure if it is an issue with ADC sample/conversion overlapping or an ADC interrupt overlapping which introduces these problems. It seems that the sampling interval period is not constant, due to interference.
I have tested ADCINT1, 3, 5 alone and ADCINT7 alone, where everything works fine, but problems occur when I combine ADCINT1,3,5 and ADCINT7 together.
I have attached my ADC settings file.
Hope there is something I have overseen in the design, all help appreciated.
Best Regards,
Pavel.