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.

MSP430FR5729: GPIO pin initialization error.

Part Number: MSP430FR5729
Other Parts Discussed in Thread: MSP430WARE

Tool/software:

Hi.
I am using msp430fr5729 chip.
As shown below, after powering on, I initialized the gpio pin to Low, but there are pins that are not set properly.
As shown below, I set P2.5 and P2.6 to Low, but they are output as High.
Is there a problem with the code I wrote?

void main (void)
{
    WDTCTL = WDTPW + WDTHOLD; // WDT 중지


    CSCTL0_H = 0xA5;
    CSCTL1 |= DCOFSEL0 + DCOFSEL1; DCO 설정 (MODOSC = 8MHz)
    CSCTL2 = SELA_3 + SELS_3 + SELM_3; ACLK = DCO 설정 , SMCLK = DCO , MCLK = DCO
    CSCTL3 = DIVA_0 + DIVS_3 + DIVM_0; // ACLK = DCO/1 , SMCLK = DCO/8 , MCLK = DCO/1

    CSCTL4 = XT1오프 + XT2오프;
    CSCTL5 &= ~(XT1OFFG + XT2OFFG);

    // timer
    TA1EX0 = TAIDEX_0; // ClockSourceDivider
    TA1CTL = TASSEL_2 + ID_0 + MC_1 + TACLR; // SMCLK, 최대 CCR0
    TA1CCR0 = TIMER_PERIOD; // 1ms irq
    TA1CCTL0 = CCIE; // TACCR0 인터럽트 활성화

    //gpio
    P1DIR |= (BIT0 + BIT1); // 포트 방향 (0:Input, 1:Outpt)
    P1REN = 0x00; 풀업 & 풀다운 레지스터 활성화 (0:Disable, 1:Enable)
    /*
    P2.2 = INPUT
    P2.3 = OUTPUT
    P2.4 = OUTPUT
    P2.5 = OUTPUT
    P2.6 = OUTPUT
    P2.7 = OUTPUT
   */
    P2DIR |= (BIT3 + BIT4 + BIT5 + BIT6 + BIT7);
    P2OUT |= (비트4);
    P2REN = 0x00;


    while(1)    {

    }

}

**Attention** This is a public forum