Part Number: MSP430FR4133
Hello.
I'm having trouble setting up the msp430fr4133 uart baudrate.
The reference project(msp430fr413x_eusci_uart_standard_transceiver) works well at 9600, 115200 baudrate.
However, it does not work properly at the 1200 baudrate setting that i set...
It seems that it was incorrectly set or omitted, but since I have no experience, it is difficult to set it up.
Refer to the guide document below for setting values.
![]()
BRCLK: 32768
Baud Rate: 1200
UCOS16: 1
UCBRx: 1
UCBRFx: 11
UCBRSx: 0x25
In the basic example, I changed only the uart_init function part to look like this.
(I'm not sure how to do the part of setting BRCLK to 32768)
void initUART_1200()
{
// Configure USCI_A0 for UART mode
UCA0CTLW0 |= UCSWRST;
//UCA0CTLW0 |= UCSSEL__SMCLK;
UCA0CTLW0 |= 0x0010;
// Baud Rate Setting
// Use Table 21-5
UCA0BRW = 8;
UCA0MCTLW |= UCOS16 | UCBRF_11 | 0x2500;
UCA0CTLW0 &= ~UCSWRST;
UCA0IE |= UCRXIE;
}
Below is the main part(reference). Are there any parts that need to be changed in other parts as well?
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // Stop Watchdog
initGPIO();
initClockTo16MHz();
//initUART();
initUART_1200();
#if UART_MODE == SMCLK_9600
__bis_SR_register(LPM0_bits + GIE); // Since ACLK is source, enter LPM0, interrupts enabled
#else
__bis_SR_register(LPM0_bits + GIE); // Since SMCLK is source, enter LPM0, interrupts enabled
#endif
__no_operation(); // For debugger
}
Is there any example code with uart baudrate set to 1200? T.T
thanks