Tool/software: Code Composer Studio
Hi,
I'm using the GPIO API included with driver Lib to turn ports 5.2/5.3/j.0/j.1 on, and I can't get them to turn on. I've connected LED's to them to ensure if they're turning on or not and can see that they're not. Here's the code:
#include "driverlib.h"
#include <msp430.h>
void main (void)
{
//Stop WDT
WDT_A_hold(WDT_A_BASE);
//PA.x output
GPIO_setAsOutputPin(GPIO_PORT_P5, GPIO_PIN2+GPIO_PIN3);
GPIO_setAsOutputPin(GPIO_PORT_PJ, GPIO_PIN0+GPIO_PIN1);
//Set all PA pins HI
GPIO_setOutputHighOnPin(GPIO_PORT_P5, GPIO_PIN2+GPIO_PIN3);
GPIO_setOutputHighOnPin(GPIO_PORT_PJ, GPIO_PIN0+GPIO_PIN1);
P1DIR |= 0x01; // configure P1.0 as output
volatile unsigned int i; // volatile to prevent optimization
while(1)
{
P1OUT ^= 0x01; // toggle P1.0
for(i=10000; i>0; i--); // delay
}
//Enter LPM4 w/interrupts enabled
__bis_SR_register(LPM4_bits + GIE);
//For debugger
__no_operation();
}
