Well.. Tried it, now P5.6 gives me +3.3V, no matter what I do. Oh my... Here is the main code and a screenshot. Guys, may be someone has a simple uVision project for providing VREF externally, which 100% works on the MSP432 launchpad? So that I could try it and see if it is my MCU that is having a glitch, or my brain has a glitch? #define V1_45 1 #define STATIC_ON 1 #define REF_OUT_ON 1 void REF_conf(void); int main(void){ REF_conf(); } void REF_conf(void){ P5DIR|=(0xc0); //Pins P5.6 and 7 are outputs P5SEL0=P5SEL1&=(~0xc0); //Reset alternate function for pins P.6&7 P5SELC|=(0xc0); //Connecting pins 6 and 7 to VREF function REFCTL0&=(~0x3b); //Clearing necessary REF control register bit fields before applying changes REFCTL0|=((V1_45<<4)|(STATIC_ON)|(REF_OUT_ON<<1)); //Apply changes }
↧