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.

MSP432E401Y: Enabling special or digital functions on a GPIO port

Part Number: MSP432E401Y

Hi there,

I have been trying to maximize the amount of available GPIOs for the MSP432E401Y, while still using 7 serial ports for communication with external devices. For these serial ports, we are not using DCD, DTR, DSR, RTS, CTS, or RI. We simply need TX and RX.

For example, we have successfully setup Port A to use pins 0 and 1 for RX and TX by doing the following:

// setup.cpp = source file for setting up GPIOs
#include <ti/devices/msp432e4/driverlib/driverlib.h>
#include <ti/devices/msp432e4/inc/msp.h>

// ...

void setupGPIO
{
    IntDisable(INT_UART0);

    SysCtlPeripheralEnable(SYSCTL_PERIPH_UART0);
    while(!(SysCtlPeripheralReady(SYSCTL_PERIPH_UART0))) {};
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
    while(!(SysCtlPeripheralReady(SYSCTL_PERIPH_GPIOA))) {};

    GPIOPinConfigure(GPIO_PA0_U0RX);
    GPIOPinConfigure(GPIO_PA1_U0TX);
    GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);

    UARTConfigSetExpClk(UART0_BASE, Globals::g_ui32SysClock, 115200,
                            (UART_CONFIG_WLEN_8 | UART_CONFIG_STOP_ONE |
                             UART_CONFIG_PAR_NONE));

    UARTFIFOEnable(UART0_BASE);
    UARTFIFOLevelSet(UART0_BASE,
                    UART_FIFO_TX4_8,
                    UART_FIFO_RX4_8);

    UARTTxIntModeSet(UART0_BASE, UART_TXINT_MODE_EOT);
    UARTIntEnable(UART0_BASE, UART_INT_RT | UART_INT_RX | UART_INT_TX);
    UARTEnable(UART0_BASE);

    IntEnable(INT_UART0);
}

When looking at the multiplexing table ('4-4 GPIO Pins and Alternate Functions' in the datasheet), all the ports special and digital functions are listed:

Although we have not manually set the port A to use digital function 1 in the code (kept it in default GPIO mode), does the call to any of the DriverLib functions (ex. `GPIOPinTypeUART(GPIO_PORTA_BASE, GPIO_PIN_0 | GPIO_PIN_1);`) override the default GPIO mode, and force all of Port A to use digital function 1? In other words, does using some pins on a port for serial communications force the entire port out of default GPIO mode, or can the other pins (i.e. 2 to 7) be used for other GPIO functions (such as toggling LEDs, etc)?

Thanks,

John