The program pasted below blinks both the Green and Red LEDs (connected to P1.0 and P4.6 respectively) on MSP-EXP430FR5969 Launchpad.
But I intend to do one more thing - i.e. control P1.2 which is coming out as BoosterPack Connector Pin. When I use a multi-meter to measure the voltage, I see that it is always zero (I have ensured that I have sufficient delay like 3 to 5 seconds to change / blink LEDs).
How can I control P1.2 coming out as BoosterPack connector pin??
#include <msp430.h>
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode
// to activate previously configured port settings
P1DIR |= 0x01; // Set P1.0 to output direction
P4DIR |= 0b01000000;
for(;;) {
volatile unsigned int i; // volatile to prevent optimization
P1OUT ^= 0x05; // Toggle P1.0 and P1.2 using exclusive-OR
P4OUT ^= 0x40;
i = 50000; // SW Delay
do i--;
while(i != 0);
i = 50000; // SW Delay
do i--;
while(i != 0);
i = 50000; // SW Delay
do i--;
while(i != 0);
i = 50000; // SW Delay
do i--;
while(i != 0);
i = 50000; // SW Delay
do i--;
while(i != 0);
i = 50000; // SW Delay
do i--;
while(i != 0);
}
return 0;
}