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.

MSP430FR2476: Driverlib function GPIO_setAsPeripheralModuleFunctionOutputPin not working with MSP430FR2476

Part Number: MSP430FR2476

I am trying to output a PWM signal on a LP-MSP430FR2476 Evaluation Board, based on the timer_a_ex5_pwmMultipleUp.c example included with the driverlib files. However, the when I call the function GPIO_setAsPeripheralModuleFunctionOutputPin to configure P1.1 (or any other pin) as a PWM output, the pin is not correctly configured.

void GPIO_setAsPeripheralModuleFunctionOutputPin (GPIO_PORT_P1, GPIO_PIN1, GPIO_PRIMARY_MODULE_FUNCTION);

If I configure the output directly using the below code, instead of the driverlib function, the pin configures correctly.

P1DIR |= BIT1;   // P1.1 output
P1SEL1 |= BIT1;  // P1.1 options select

I was able to diagnose the issue thanks to this thread from 6 years ago, but there is no record of how it was resolved. I suspect the issue lies with either the driverlib gpio.c file or the MSP430FR2476.h header file, but I have been unable to identify the cause so far.

I would appreciate any guidance on what may be causing the error, and how I can modify the above files to give the expected behaviour. Thanks in advance.

  • P1SEL1 |= BIT1;  // P1.1 options select

    A PSEL setting of 10 [correct per datasheet (SLASEO7C) Table 9-23] corresponds with GPIO_SECONDARY_MODULE_FUNCTION. 

**Attention** This is a public forum