Hi,
I'm using the F28335 control card and trying to utilize the ADC module. I have followed the examples provided by TI, and it seems that the channels A0-5 and B0-5 works fine (reading with 1-2 levels deviation).
However, the values reading from the channels Α6, Α7, Β6 and B7 present significant deviation of the order of 100 levels when I measure a constant DC volatge (eg. a variable potentiometer between Gnd and Vdd=3.3V). Even more strangely, when these pins are left unconnected, they measure an arbitary value but with no deviation!
Moreover, when the provided voltage is very close to 3V, this deviation is eliminated.
So to sum up, when the pins of A6,7 B6,7 are left unconnected --> no deviation
when a DC voltage 3V is applied --> no deviation
when a DC voltage is applied from 0V-2.9V --> significant deviation
This is the setup code:
// ADCTRL1
AdcRegs.ADCTRL1.all = 0;
AdcRegs.ADCTRL1.bit.ACQ_PS = 7; // freeze window= 8xADCc
AdcRegs.ADCTRL1.bit.SEQ_CASC =1; // cascaded sequencer
AdcRegs.ADCTRL1.bit.CPS = 0; // divide by 1
AdcRegs.ADCTRL1.bit.CONT_RUN = 0; // one shot run mode
AdcRegs.ADCTRL1.bit.SUSMOD = 0; // do not stop at debug
// ADCTRL2
AdcRegs.ADCTRL2.all = 0;
AdcRegs.ADCTRL2.bit.INT_ENA_SEQ1 = 1; // enable SEQ1 interrupt
AdcRegs.ADCTRL2.bit.EPWM_SOCA_SEQ1 =1; // SEQ1 start from ePWM_SOCA trigger
AdcRegs.ADCTRL2.bit.INT_MOD_SEQ1 = 0; // interrupt after every end of sequence
AdcRegs.ADCTRL2.bit.SOC_SEQ1 = 0; // DO NOT Start conversion by software
// ADCTRL3
AdcRegs.ADCTRL3.bit.ADCCLKPS = 3; // ADC clock: FCLK = HSPCLK / 2 * ADCCLKPS
// HSPCLK = 75MHz (see DSP2833x_SysCtrl.c)
// FCLK = 12.5 MHz
I have also tried the codes provided by TI with no difference. It is not a clock issue because I tried very slow reading.
I also tried this in 2 other control card which were available in the lab. Exactly the same results!
Strange? Any ideas?