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.

CCS/MSP430F5438A: UART

Part Number: MSP430F5438A

Tool/software: Code Composer Studio

Hi, I have trouble in calculating the USCI UART Baud rate Register values. 

My Clock Speed is 25001984 Hz, the Baud Rate I want is 230400. 

According to the user' guide, the calculation of the register values should be;

N=fBRCLK/Baudrate=25001984/230400=108.52

UCBR0=INT(N/16)=6

UCBRF0=round([(N/16)-INT(N/16)])*16)=round[(6.78222222-6)*16]=round(0.7822222*16)=round(12.5155556)=13

But when I calculate them on your website    processors.wiki.ti.com/index.php/USCI_UART_Baud_Rate_Gen_Mode_Selection

the results are :Divider= 6.782222222222222; BRDIV= 6           S-Modulation UCBRSx= 2          F-Modulation UCBRFx= 11

So why the value of UCBRFx is different from what I calculated ?   which one is right? 11 or 13?

And how can I calculate UCBRS0 by myself?

  • From section "36.3.10.2" of the user manual, the UCBRSx can be used to achieve greater accuracy.

    So, to answer your questions:
    They are different because the website includes the UCBRSx setting.
    UCBRSx (I believe, but TI can correct me on this) is calculated by brute force analysis of bit errors.

    Your calculations are correct and you could use them, but the numbers provided in the website might have less bit errors. If they both work, I would recommend using the numbers of the website as they might give you less bit errors.
  • Thank you very much Mike. what if I use Low-Frequency Baud-Rate Generation instead of the oversampling Baud-rate generation? Does it work better than the oversampling generation in my case? Because according to the results they provided in the website:

    For Low-Frequency Baud-rate generation: Max. TX bit error: -0.6184469200526053(-0.6184469200526053, 0)
    Max. RX bit error (sync.: -0.5 BRCLK): -0.8416612057668589(-0.8416612057668589,0)

    But for over-sampling baud-rate generation: Max. TX bit error: 2.735910878112736(-1.5113040629094638,2.735910878112736)
    Max. RX bit error (sync.: -0.5 BRCLK): 3.4342234600262054(-0.8129914809960719,3.4342234600262054)

    Does these mean the Low-frequency baud-rate generation method causes less error in data transmission ? Do I understand correctly?
  • From the numbers you provided, the Low-Frequency seems to be a better option. I am actually surprised (since over-sampling has higher majority number)!
  • Thank you very much, I am very appreciate your help!
    Best wishes!

**Attention** This is a public forum