Hi,
I had a great deal of pain setting up UART baud rate.
After deep diving into TI-RTOS code I think there I found a bug -
UART_open() is eventually calling UARTUSCIA_open() [uartuscia,c] which in turn calls ClockFreqs_getFrequency() (line 350)
HOWEVER, ClockFreqs_getFrequency() does always return 8192000 regardless of the actual SMCLK !!!
I also verified it by putting the 'true' UARTUSCIA_BaudrateConfig values that relate to SMCLK=1024KHz into a line with 8192KHz 'prefix'. see below.
This time it worked perfectly.
/* * The baudrate dividers were determined by using the MSP430 baudrate * calculator * http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSP430BaudRateConverter/index.html */ const UARTUSCIA_BaudrateConfig uartUSCIABaudrates[] = { /* baudrate, input clock, prescalar, UCBRFx, UCBRSx, oversampling */ {115200, 8192000, 8, 0, 7, 0}, // <<<< Original 8192KHz vals are: 4, 7, 0, 1}, {115200, 1024000, 8, 0, 7, 0}, /* Actual SMCLK = 1.024MHz*/ {9600, 8192000,53, 5, 0, 1}, {9600, 1024000, 6, 9, 2, 1}, /* Actual SMCLK = 1.024MHz*/ {9600, 32768, 3, 0, 3, 0}, };
I'll appreciate if someone at TI could check this out and issue a patch ASAP if proven right.
Thanks