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.

MSP430FR2475: The serial port has no output signal

Part Number: MSP430FR2475

Hi team,

Here's an issue from the customer may need your help:

The serial port configured according to the Driverlib demo cannot output normally. When measured with an oscilloscope it has no information.

Pins have been tested without problems.

External main crystal oscillator 32.768K.

Here's the configured file.

#include "driverlib.h"
//******************************************************************************
//!
//!   Empty Project that includes driverlib
//!
//******************************************************************************
   
   
void main(void)
{
   // stop watchdog
    WDT_A_hold(WDT_A_BASE);

    GPIO_setAsPeripheralModuleFunctionInputPin(
        GPIO_PORT_P2,
        GPIO_PIN1 + GPIO_PIN0,
        GPIO_PRIMARY_MODULE_FUNCTION
        );

    //Set external clock frequency to 32.768 KHz
    CS_setExternalClockSource(32768);
    //Set ACLK=XT1
    CS_initClockSignal(CS_ACLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);
    //Start XT1 with no time out
    CS_turnOnXT1(CS_XT1_DRIVE_1);
    //Set SMCLK = DCO with frequency divider of 1
    CS_initClockSignal(CS_SMCLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);
    //Set MCLK = DCO with frequency divider of 1
    CS_initClockSignal(CS_MCLK,CS_XT1CLK_SELECT,CS_CLOCK_DIVIDER_1);

    // Configure UART pins
    //Set P1.0 and P1.1 as Secondary Module Function Input.
    /*

     * Select Port 1
     * Set Pin 0, 1 to input with function, (UCA0TXD/UCA0SIMO, UCA0RXD/UCA0SOMI).
     */
    GPIO_setAsPeripheralModuleFunctionInputPin(
        GPIO_PORT_P5,
        GPIO_PIN1 + GPIO_PIN2,
        GPIO_PRIMARY_MODULE_FUNCTION
        );

    /*
     * Disable the GPIO power-on default high-impedance mode to activate
     * previously configured port settings
     */
    PMM_unlockLPM5();

    //Configure UART
    //SMCLK = 1MHz, Baudrate = 115200
    //UCBRx = 8, UCBRFx = 0, UCBRSx = 0xD6, UCOS16 = 0
    EUSCI_A_UART_initParam param = {0};
    param.selectClockSource = EUSCI_A_UART_CLOCKSOURCE_ACLK;
    param.clockPrescalar = 3;
    param.firstModReg = 0;
    param.secondModReg = 146;
    param.parity = EUSCI_A_UART_NO_PARITY;
    param.msborLsbFirst = EUSCI_A_UART_LSB_FIRST;
    param.numberofStopBits = EUSCI_A_UART_ONE_STOP_BIT;
    param.uartMode = EUSCI_A_UART_MODE;
    param.overSampling = EUSCI_A_UART_LOW_FREQUENCY_BAUDRATE_GENERATION;

    if(STATUS_FAIL == EUSCI_A_UART_init(EUSCI_A0_BASE, &param))
    {
        return;
    }

    EUSCI_A_UART_enable(EUSCI_A0_BASE);

    
    while(1)
    {
        // Load data onto buffer
        EUSCI_A_UART_transmitData(EUSCI_A0_BASE, 'A');
        __delay_cycles(32768);
    }
}

Thanks.

Best Regards,

Yale

**Attention** This is a public forum