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: Simple GPIO Issues

Part Number: MSP430FR5969

Hi,

I'm working on project that involves this microprocessor (MSP430FR5969) and I'm having trouble getting simple GPIO driving/sensing working right now.

CCS version: 12.1.0.00007.

I have a switch connected to P3.4 that can be used to drive either a '0' or a '1' at that pin:

#include <msp430.h>
#include <stdint.h>

int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;   /* Hold on-chip WDT. */

    volatile uint8_t nP3IN;

    /* Assert power-on defaults. */
    P3SEL0 = 0;
    P3SEL1 = 0;
    P3REN = 0;
    P3OUT = 0;
    P3DIR = 0;

    while( 1 ) {
        nP3IN = P3IN;   /* Read 'P3IN'. */
    }
}


Toggling the switch does not cause any change in the P1IN register. I can confirm that the pin level was changing between GND and VCC ('0' and '1') when probing with a multimeter.

Similarly, I seem to be unable to drive anything out of this microcontroller's GPIO pins. I have a DNF resistor pad connected to P3.3 that I can probe with a multimeter to sense pin level changes:

#include <msp430.h>

int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;   /* Hold on-chip WDT. */

    /* Assert power-on defaults. */
    P3SEL0 = 0;
    P3SEL1 = 0;
    P3REN = 0;
    P3OUT = 0;

    P3DIR = BIT3; /* Set data direction of P3.3 to '1' (drive output). */

    while( 1 ) {
        P3OUT = BIT3;   /* Drive '1' on P3.3. */
        P3OUT = 0;      /* Drive '0' on P3.3. */
    }
}


Steps taken to create each project:

1. Load CCS and select a new workspace.
2. Click 'New Project' from the "Getting Started" splash page.
3. Select "MSP430FR5969" from the list of target devices, give the project any sort of name and select the "Empty Project (with main.c)" template. Hit "Finish".
4. Copy and Paste either of the two code snippets into the "main.c" source file.
5. Hit the "Debug" button within the CCS toolbar to program the device and step through "main.c".

I'm a bit perplexed as to what could be going wrong here. Any pointers would be greatly appreciated.

Best regards,
KM

**Attention** This is a public forum