I am executing the code below on a TI MSP430 microcontroller. Basically what I expect it to do is to toggle both LEDS regularly (Pin 1.0 and Pin 4.7). Unfortunately only the LED on Pin 1.0 is toggled, the other one is on all the time. Can someone tell me why that is the case?
int main(void) {
WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
// Set P1.0 and P4.7 as output pins
P1DIR |= BIT0;
P4DIR |= BIT7;
for(;;)
{
P4OUT |= BIT7;
__delay_cycles(2500000); // 1sec at 25MHz
P1OUT ^= BIT0;
P4OUT &= 0x0;
}
return 0;}