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.

MSP430F5247 shared reference problem

I am attempting to use the 2.5v reference with the 10 bit AtoD in the 5247 device.


I setup the reference with this code:

REFCTL0 |= REFMSTR + REFVSEL_3 + REFON + REFOUT

and when I look at the register with the debugger its contents match this setup.

I select the reference in the ADC setup with this code:

ADC10MCTL0 = ADC10SREF_1 + ADC10INCH_4;

I am not seeing the reference voltage. I'm giving the channel an input of 1.57v and I'm getting 510 counts. My calculations show I should be getting 642 counts.

When I select Vcc as a reference (ADC10SREF_0), I get appropriate readings.


Is there some setup I have to do in addition to setting REFCTL0?

  • Addition: I have tried 3 of the 4 reference voltage selections: REFVSEL_1, 2, 3 and always get the same ADC readings.

  • It almost looks as if you're overriding the reference with VCC (~3.2V reference means 510 counts for 1.57V)

    If you change your 1.57V, what readings do you get then?

    You didn’t post the complete setup code, so maybe you made a mistake somewhere else.
    After switching on the reference, you’ll have to wait until it is settled, or you’ll get wrong readings.
    On some MSPs, for higher conversion clocks (including the default MODOSC), using the reference requires the reference voltage externally buffered. See the device errata sheet. For this, you might need to set REFOUT too.

  • I found the fix. I removed REFOUT from the REFCTL0 setup.

    I have no idea why this was killing the reference voltage, but it fixed it.

**Attention** This is a public forum