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.

MSP430FR5994: what is "PM5CTL0 &= ~LOCKLPM5;" meaning?

Part Number: MSP430FR5994

#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
    P1DIR = 0x01;                          // Set P1.0 to output direction
    P1OUT = 0x00;
    P1REN = 0x00;
    while(1){
        if ((P1IN & 0x08) == 0x08)
            P1OUT = 0x01;
        else
            P1OUT = 0x00;
    }

}

In this code, i am try to achieve a voltage detecttion, however, i don't know the meaning of code "PM5CTL0 &= ~LOCKLPM5;". if i delete it, the output of specific pin would keep in off state. 

So i want to the accurate meaning of the code "PM5CTL0 &= ~LOCKLPM5;" and how to use it correctly.