Hello!
We are using a TMS320F2808 and trying to measure a given signal (~1.2V) with different references. Whenever we calculate the measured voltage we see that we always use 3.0V as reference.
Our connection is as follows:
And code:
DELAY_US(10000L); AdcRegs.ADCTRL1.bit.RESET = 1; DELAY_US(ADC_usDELAY); asm(" NOP "); asm(" NOP "); AdcRegs.ADCREFSEL.bit.REF_SEL = 0x1; DELAY_US(ADC_usDELAY); // Acquisition window size. This bit field controls the width of SOC pulse, which, in turn, // determines for what time duration the sampling switch is closed. AdcRegs.ADCTRL1.bit.ACQ_PS = 0x0; // Core clock prescaler. The prescaler is applied to divided device peripheral clock, HSPCLK (High Speed Prescaler Clock). AdcRegs.ADCTRL1.bit.CPS = 0x1; // Continuous run AdcRegs.ADCTRL1.bit.CONT_RUN = 0x1; // Setup sequencer AdcRegs.ADCCHSELSEQ1.bit.CONV00 = 0x8; DELAY_US(ADC_usDELAY); // Start ADC AdcRegs.ADCTRL3.all = ADC_POWER_UP; DELAY_US(ADC_usDELAY); // Start conversion AdcRegs.ADCTRL2.bit.SOC_SEQ1 = 0x1;
Where ADC_usDELAY = 10ms and we enable the ADC module clock in another module.
If i measure 1.13V on ADCINB0 (according to datasheet 0x8 in AdcRegs.ADCCHSELSEQ1.bit.CONV00 gives me the converted result from ADCINB0 in ADCRESULT0) I expect the value 1.13 / 2.048 * 4096 = 2260 in the result register. Though I get the value 1542, which corresponds to a reference of 3.0V (internal bandgap reference).
Is there something wrong with the software or is the hardware connection wrong?
I tried to search but haven't seen any similar problem.
Thanks in advance!


