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.

MSP430FR2433: UART output byte is not always correct

Part Number: MSP430FR2433

Hello,

I am new to MSP430 series micro-controller and I am playing around the UART of MSP430FR2433 dev kit.

But when I output the byte of 'A' (hex: 0x41) to USCI_A0  UART, the result is sometimes not correct.

I have checked the example code "MSP430FR24xx Demo - USCI_A0 External Loopback test @ 115200 baud" but result is the same with 0xC1 and 0x81 instead of 0x41.

Here is the output log.

C1 C1 41 C1 41 41 C1 41 41 C1 C1 41 41 C1 C1 41 C1 41 C1 C1 C1 C1 41 41 C1 41 C1 41 C1 41 41 C1 41 C1 C1 C1 41 41 41 C1 41 C1 C1 41 C1 41 41 C1 41 C1 C1 41 C1 41 41 41 41 41 C1 41 C1 C1 C1 C1 C1 C1 C1 41 41 81 C1 41 41 C1 81 C1 C1 C1 41 C1 81 41 C1 41 81 C1 C1 81 C1 C1 41

int main(void)
{
	WDTCTL = WDTPW | WDTHOLD;	    // stop watchdog timer

	P1DIR = 0x01;
    P1OUT = 0x00;
    P1REN = 0x00;

    P1SEL1 &= ~(BIT4 | BIT5);       // USCI_A0 UART operation
    P1SEL0 |= BIT4 | BIT5;

    UCA0CTLW0 |= UCSWRST;           // Put UART A0 to software reset
    UCA0CTLW0 |= UCSSEL__SMCLK;     // Use SMCLK(1MHz) for baud rate calculation
    UCA0BRW = 8;                    // N = f/BR = 1000000/115200 = 8.68055555
    UCA0MCTLW = 0xD600;             // 1000000/115200 - INT(1000000/115200)=0.68 -> (From UG TABLE 22-4)0xD6
    UCA0CTLW0 &= ~UCSWRST;          // Releas UART software reset

    PM5CTL0 &= ~LOCKLPM5;           // Disable the GPIO power-on default high-impedance mode to activate previously configured port settings

    char ch = 'A';
    while(1){
        UCA0TXBUF = ch;
        __delay_cycles(500000);
    }

	return 0;
}

**Attention** This is a public forum