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.

MSP430FR5969: Port J I/O Issue

Part Number: MSP430FR5969

I want to use Port J pin 6 and 7 as Output on MSP430Fr5969 Controller.

During GPIO initialization , all the ports are made output and low using following instructions:

P1DIR = 0xFF;

P2DIR = 0xFF;

P3DIR = 0xFF;

P4DIR = 0xFF;

PJDIR = 0xFFFF;

 

P1OUT =0x00;

P2OUT =0x00;

P3OUT =0x00;

P4OUT =0x00;

PJOUT =0x0000;

 

But when I try to put GPIO 6 and 7 of Port J high, it does not set the pin high..

Is there any special settings for Port J on MSP430Fr5969 controller since pins on Port J are shared with JTAG connection as well.

 

I am using GPIO_setOutputHighOnPin(GPIO_PORT_PJ,GPIO_PIN6) to set the pin High

Same thing is also observed with Port 1 Pin 6 and pin 7.

Let me know if I have missed something

With Regards

Aalakh Devari

  • Hi Aalakh,

    You may be missing this code : PM5CTL0 &= ~LOCKLPM5;


    A normal program for your reference : 

    #include <msp430.h>
    
    int main(void) {
        WDTCTL = WDTPW | WDTHOLD;               // Stop watchdog timer
    
        // Configure GPIO
        PJDIR |= BIT6 | BIT7;
        PJSEL0 &= ~(BIT6 | BIT7);
        PJSEL1 &= ~(BIT6 | BIT7);
    
        PM5CTL0 &= ~LOCKLPM5;
        // Now blink the LED in an endless loop.
        while (1) {
            PJOUT ^= BIT6;                       // PJ.6 = toggle
            PJOUT ^= BIT7;                       // PJ.7 = toggle
            __delay_cycles(100000);
        }
    }

    Best Regards

    Johnson

**Attention** This is a public forum