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.

TMS320F28377S: TMS320F28377S

Part Number: TMS320F28377S

Hi ,

I am using TMS320F 28377S ADC. When inputting the input voltage of ADC in units of 10 mV, the result of the ADC needs to be linear, but in the system I am using, the ADC result values are not linear but cascade. What's wrong?

The adc conversion period is 10 ms, and all channels are read at once

Test result is bellow.

<Input Voltage>   < ADC result>
3.40                 2501
3.41                 2511
3.42                 2517
3.43                 2518
3.44                 2533
3.45                 2543

My system settings are as follows 

{
 EALLOW;

 AdcaRegs.ADCCTL2.bit.PRESCALE = 15;
 AdcbRegs.ADCCTL2.bit.PRESCALE = 15;

 AdcSetMode(ADC_ADCA, ADC_RESOLUTION_12BIT, ADC_SIGNALMODE_SINGLE);
 AdcSetMode(ADC_ADCB, ADC_RESOLUTION_12BIT, ADC_SIGNALMODE_SINGLE);

 //Set pulse positions to late
 AdcaRegs.ADCCTL1.bit.INTPULSEPOS = 1;
 AdcbRegs.ADCCTL1.bit.INTPULSEPOS = 1;

 //power up the ADCs
 AdcaRegs.ADCCTL1.bit.ADCPWDNZ = 1;
 AdcbRegs.ADCCTL1.bit.ADCPWDNZ = 1;

 //delay for 1ms to allow ADC time to power up
 DELAY_US(1000);

 //Select the channels to convert and end of conversion flag
 //ADCA
 AdcaRegs.ADCSOC2CTL.bit.CHSEL = 2;
 AdcaRegs.ADCSOC3CTL.bit.CHSEL = 3;
 AdcaRegs.ADCSOC4CTL.bit.CHSEL = 4;
 AdcaRegs.ADCSOC5CTL.bit.CHSEL = 5;

 AdcaRegs.ADCSOC2CTL.bit.ACQPS = 30; 
 AdcaRegs.ADCSOC3CTL.bit.ACQPS = 30;
 AdcaRegs.ADCSOC4CTL.bit.ACQPS = 30;
 AdcaRegs.ADCSOC5CTL.bit.ACQPS = 30;

 AdcaRegs.ADCINTSEL1N2.bit.INT1E =   1; 
 AdcaRegs.ADCINTSEL1N2.bit.INT1SEL = 5;
 AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;

 //ADCB
 AdcbRegs.ADCSOC0CTL.bit.CHSEL = 0; 
 AdcbRegs.ADCSOC2CTL.bit.CHSEL = 2; 
 AdcbRegs.ADCSOC3CTL.bit.CHSEL = 3; 

 AdcbRegs.ADCSOC0CTL.bit.ACQPS = 30; 
 AdcbRegs.ADCSOC2CTL.bit.ACQPS = 30; 
 AdcbRegs.ADCSOC3CTL.bit.ACQPS = 30;

 AdcbRegs.ADCINTSEL1N2.bit.INT1E = 1;  
 AdcbRegs.ADCINTSEL1N2.bit.INT1SEL = 3;
 AdcbRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;
 EDIS;
}

adc Results read as follows
{
 AdcaRegs.ADCSOCFRC1.all = 0x003C; //SOC2, 3, 4, 5
 while(AdcaRegs.ADCINTFLG.bit.ADCINT1 == 0);
 AdcaRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;

 us_resulta2 = AdcaResultRegs.ADCRESULT2;
 us_resulta3 = AdcaResultRegs.ADCRESULT3;
 us_resulta4 = AdcaResultRegs.ADCRESULT4;
 us_resulta5 = AdcaResultRegs.ADCRESULT5;


 AdcbRegs.ADCSOCFRC1.all = 0x000D; //SOC0,2,3
 //wait for ADCB to complete, then acknowledge flag
 while(AdcbRegs.ADCINTFLG.bit.ADCINT1 == 0);
 AdcbRegs.ADCINTFLGCLR.bit.ADCINT1 = 1;

 us_resultb0 = AdcbResultRegs.ADCRESULT0;
 us_resultb2 = AdcbResultRegs.ADCRESULT2;
 us_resultb3 = AdcbResultRegs.ADCRESULT3;
}

Please give us a little opinion on what is the problem

Thanks, Steven Kim