This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR2111: Unable to control GPIO

Part Number: MSP430FR2111
Other Parts Discussed in Thread: MSP430WARE

I have an MSP430FR2111 on a custom PCB I made. I have two LEDs on P2.0 and P2.1 that I wanted to test out so I wrote a basic program to blink them.

I am using the MSP-FET430UIF to program and debug using 2-wire SBW interface. CCS recognizes the MSP and programs it. I can debug and step through lines of code, set breakpoints, etc. but nothing actually happens on the outputs. I can see the correct values in the register view during debug but the LEDs don't light up. I probed the pins with a multimeter and oscope and absolutely nothing happens to them.

This is really befuddling me, please let me know if you have any ideas.

  • How should we point you to the bug in your program when you keep its source code secret?
    (Well, my crystal ball mumbles something about clearing LOCKLPM5, but in general, this is not realiable debugging mechanism.)

  • Hi Sam,

    On our FRAM family of devices, you must first default high-impedance state of the GPIO using this line of code:

        // Disable the GPIO power-on default high-impedance mode to activate
        // previously configured port settings
        PM5CTL0 &= ~LOCKLPM5;

    Without this, any operations performed on GPIO will have no affect. You can also find examples of how to use the GPIO on the MSP430 in MSP430Ware via TI Resource Explorer.

    Best regards, 
    Caleb Overbay

  • I have that line of code already in my file, but it still doesn't do anything. Here's my code:

    #include <msp430.h> 
    
    
    /**
     * main.c
     */
    int main(void)
    {
    	WDTCTL = WDTPW | WDTHOLD;	// stop watchdog timer
    
    	P2DIR|=BIT0|BIT1;
    	P2OUT|=0;
    
        PM5CTL0&=~LOCKLPM5;
    
    	while(1)
    	{
    	    P2OUT^=BIT1;
            __delay_cycles(100000);             // Delay for 100000*(1/MCLK)=0.1s
    	    P2OUT^=BIT0;
            __delay_cycles(100000);             // Delay for 100000*(1/MCLK)=0.1s
    	}
    }
    

  • Hi Sam,

    Can you try running the default blinky example found here and letting me know if it works. This will tell us if it's a hardware or software issue.

    Best regards,

    Caleb Overbay

  • Hi Sam,

    Were you able to solve the issue you were experiencing? If so, can you post the solution for others who may experience the same problem?

    Best regards,
    Caleb Overbay

**Attention** This is a public forum