Hi All,
I am using CCS5.3, SYS/BIOS for Project Development,In our project We have some HWI,SWI, Tasks and semaphores configured.
SYS/BIOS Version:6.34.2.18
DSP:TMS320F28335
XDCTools:3.24.5.48
We have ADC HWI Isr Configured
ADC sampling rate is 5100,When we feed AC Voltage to Channel A0(Pin No :42),B0(Pin No :46) for 120 V the voltage Samples plotted in the software for Channel A0 is clipped in negative peak of the signal,Whereas the waveform for Channel B0 is good.
When we provide low voltage to both the channel(Less than 100V,60Hz) the waveform is fine without any clipping on the channel A0,
and Channel B0 Waveform is also good
Our ADC Configurations looks like this:
/* Set up Simulatenous sampling mode */
AdcRegs.ADCTRL3.bit.SMODE_SEL = 1;
/* Set up Cascade mode of sequencer */
AdcRegs.ADCTRL1.bit.SEQ_CASC = 1;
/* Set up 16 conversions in simultaneous mode */
AdcRegs.ADCMAXCONV.all = 0x0007;
AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0;
AdcRegs.ADCCHSELSEQ1.bit.CONV01 = 1;
AdcRegs.ADCCHSELSEQ1.bit.CONV02 = 2;
AdcRegs.ADCCHSELSEQ1.bit.CONV03 = 3;
AdcRegs.ADCCHSELSEQ2.bit.CONV04 = 4;
AdcRegs.ADCCHSELSEQ2.bit.CONV05 = 5;
AdcRegs.ADCCHSELSEQ2.bit.CONV06 = 6;
AdcRegs.ADCCHSELSEQ2.bit.CONV07 = 7;
/* Set acquisition time to 1 ADC CLK */
AdcRegs.ADCTRL1.bit.ACQ_PS = 0x00;
/* Enable SOCA from ePWM to start SEQ1 */
AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 = 1;
/* Enable SEQ1 interrupt (every EOS) */
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1;
/* Configure ePWM1 to give Start of Conversion to ADC */
/* Enable SOC on A group */
EPwm1Regs.ETSEL.bit.SOCAEN = 1;
/* SOC when time base reaches period value */
EPwm1Regs.ETSEL.bit.SOCASEL = 2;
/* Generate pulse on 1st event */
EPwm1Regs.ETPS.bit.SOCAPRD = 1;
/*150 Mhz/6 = 12.5 MHz time base */
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 3;
/* Set period of 0.1 ms ((1/5100)*25000000)*/
EPwm1Regs.TBPRD = ADC_PWDCLK_RATE;//Sampling rate 5100
/* Count up and start */
EPwm1Regs.TBCTL.bit.CTRMODE = 0;
When we increased our acquisition Time in the configuration to 80ns Both the channel (A0 and B0) waveforms are good(without any clippage). We Changed the following line in configuration i.e
AdcRegs.ADCTRL1.bit.ACQ_PS = 0x01;
Please Share your comments.
Thanks,
Manju