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.

MSP432P401M: UART TX and RX error

Part Number: MSP432P401M

Dear Champs,

As datasheet, we know UART max BRCLK @Vcore 1.4V = 24MHz. But we could see the TX and RX error on Table 22-5. Recommended Settings for Typical Crystals and Baud Rates on MSP432P4xx SimpleLink™ Microcontrollers Technical Reference Manual (Rev. F) .

Could you kindly provide the TX and RX error data for BRCLK = 24MHz? 

If you have any concern, please feel free to let me know.

Thanks a lot.

  • Dear Champs,

    Other problem is how to calculate UCBRSx? Like Table 22-4. UCBRSx Settings for Fractional Portion of N = fBRCLK/Baud Rate
    It seems like not similar with previous method like processors.wiki.ti.com/.../USCI_UART_Baud_Rate_Gen_Mode_Selection
    Could you kindly share how to calculate UCBRSx?
    Thanks a lot.
  • Janet,

    All of this depends on your baud rate you desire.

    Sections 22.3.10, 22.3.11 and 22.3.12 of the TRM you linked are built to walk you through calculating everything you are asking for. In addition to knowing your BRCLK of 24MHz, you need to know the desired baud rate to be able to calculate everything. Have you walked through this?
  • Dear Evan,

    Yes, I have studied all.

    After studied it and hope to test the calculation, take an example as red block.

    BRCLK = 32768, Baud rate = 1200. N = INT (32768/1200) = 27.

    So that, OS16 = 1, UCBRx = INT (27/16) = 1, UCBRFx = INT([(27/16) – INT(27/16)] × 16) = 11. But my problem is UCBRSx.

    For UCBRSx, 32768/1200 = 27.3066667.

    As 0.3066667, I try to use Table 22-4, but how do I select in? 

    If using  USCI UART Baud Rate Gen Mode Selection, http://processors.wiki.ti.com/index.php/USCI_UART_Baud_Rate_Gen_Mode_Selection

    UCBRCSx = Round (0.3066667*8) = 2. 

    Why UCBRCSx is 0x25hex (37dec)?

    Could user only need to use Table 22-4 to get UCBRCSx or exist any UCBRCSx calculation method? 

    Second, customer's demand is BRCLK = 24MHz, Baud rate = 115200, could you kindly provide TX Error (neg/pos) and RX Error (neg/pos)? 

    If you have any concern, please feel free to let me know.

    Thanks a lot.

  • Janet,

    First point, to the link you provided, the "USCI UART Buad Gen Mode" link, is built to calculate the settings for a different class of devices. USCI and eUSCI (which is what is on the MSP432) are two different things and the calculations will not come out to be the same so please do not use that link for this effort. Please trust the UCBRSx value you received from the datasheet.

    In the instance for your fractional portion, I would round to the closest setting for UCBRSx as you see was done for your first example.

    I'll look into the TX/RX error calculation for 24mhz and see what I can find.
  • Dear Evan,

    Thanks for your explanation.
    So, as my example, |0.3066667-0.3000|<|0.3066667-0.3335|, so that select 0x25.
    It means user just select the closest number as UCBRSx, right?

    And for 24MHz BRCLK, please kindly provide the TX/RX error rate.

    I will also calculate it and double check this with you.
    Thanks a lot.
  • Janet,

    Thank you for your patience.

    Clock: 24000000
    Baudrate: 115200
    UCOS16 = 1
    UCBRx = 13
    UCFx = 0
    UCSx = 0x25

    Max. TX bit error [%]: (-0.150000, 0.320000)
    Max. RX bit error [%]: (-0.470000, 0.480000)

    Please let me know if you have any more questions.
  • Dear Evan,

    Thanks for your sharing.

    After I use this method to calculate the TX/RX error.

    I found one question on below condition: 

    BRCLK = 24MHz, baud rare = 115200, so that 240000000/115200 = 4000000/19200 = 208.333333, but its UCBRSx = 0x84. 

    But I can't find 0x84 in Table 22-4.

    So when the fractional Portion of N is 0.3333, is UCBRSx "0x84" or "0x25" ? 

    If you have any suggestion or idea, please feel free to let me know.

    Thanks a lot.

  • Janet,

    The fractional part of N in your case is .333333, using Table 22-4, I would round up to the portion on the table and use 0.3335 and use 0x49 for UCBRSx and see how this works for your customer. If they start seeing an error that is not that acceptable, then I would encourage them to use 0x25.

    The UCBRSx component adds very little influence to the overall error calculation so i'm not too concerned between the two of these values.
  • Dear Evan,

    Understood, I have based this calculated method to build up an equation in excel.

    But just meet some little problems as above, like 4000000/19200 = 208.333333, but its UCBRSx = 0x84, Why not 0x25?

    Could you please kindly help me check this little confusion? If it is TRM error, could you please kindly update it? 

    Thanks a lot.

  • Janet,

    I've recognized the same thing you have and we are investigating it. It could be as simple as a typo and we will update if so. In the meantime, it's best to refer to Table 22-4.
  • Janet, 

    How did the advice work for the customer?

**Attention** This is a public forum