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.

MSP430FR2110: Problems to setup P2 in MSP430FR2110

Part Number: MSP430FR2110
I try to use the pins P2.0 and P2.1 configured as outputs in an MSP430F2110 in my application in assembler, but I can not get any logical level in the output, the pins are always in hi z, I try to do a test with the 
example program " blik.c "in CCS but the resuslt is the same, could someone tell me what I'm doing wrong? I am using the following hardware: MSP-TS430PW20 and the MSP-FET and the following
configuration of P2 in the program "blink.c"

#include <msp430.h>

void 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
      P2DIR |= 0x03;                                        // Set P2.0 to output direction

for(;;) {
volatile unsigned int i; // volatile to prevent optimization

         P2OUT ^= 0x03; // Toggle P1.0 using exclusive-OR |

         i = 10000; // SW Delay
        do i--;
        while(i != 0);
        }
}

  • I tried this code on an FR2311 Launchpad (no, not quite the same, but maybe not too far off) and it seemed to function correctly, blinking two LEDs. The suggestion is that there's something outside this code.

    How are you detecting that the pins are hi-Z? Can you tell whether the program is even starting up?
  • You are right, I also have a launchpad and have taken the test as you, and there the program works without problems, after revising it I realized that my program does not have the following code line,

    bic.w #1,&PM5CTL0

    I add this line and everything works correctly

    Thank you so much for your help !!!

  • You are right, I also have a launchpad and have taken the test as you, and there the program works without problems, after revising it I realized that my program does not have the following code line,

    bic.w #1,&PM5CTL0

    I add this line and everything works correctly

    Thank you so much for your help !!!

**Attention** This is a public forum