I am having difficulty getting the internal reference voltage output on the Vref+ pin.
Stripped down code:
#include <msp430.h>
/*
* main.c
*/
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
// Get write-access to port mapping regs.
PMAPPWD = 0x02D52;
P2MAP5 = PM_ANALOG;
// And lock port mapping registers.
PMAPPWD = 0;
P2SEL = BIT4 | BIT5;
REFCTL0 = REFMSTR + REFON + REFOUT + REFVSEL_0;
for (;;) {;}
}
If I run this code with the debugger I do measure a (stable) voltage of 1,436V on the Vref+. (P2.5 pin)
However when I then shut down the device and start it without the debugger the reference voltage does not appear on the pin.
Also I have set the reference to 1,5V but measure only 1,436V.
I would like to know how I get a the 1,5V on the pin also when not started from the debugger?
Any help is greatly appreciated.