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.

MSP430F5x UART baud rate mismatch tolerance level

Other Parts Discussed in Thread: MSP430F5529, MSP430F5521

Hi,

In the application MSP430F5521 and MSP430F5529 are interacting over the UART.

We do have five systems in lab, all the systems are loaded with the following configuration settings as shown below, only one unit shows the mismatch error and all other four units are interacting, no error observed

If we refer to the user manual of the device the tolerance of the baud rate is very less i.,e +/- 0.05% for 9600 so the range is between ( 9505, 9605)

How the two micon’s communicated even though there is a difference of 440.

MICON : MSP430F5521 IC

Actually micon is operating at 12 Mhz, but the sys clock used for calculating the baud value was wrongly hard coded as 12582912.

Baud_value = (sys clock) / Baud_rate)  => Baud_value = (12582912 / 9600);         => Divisor value is 1310 , if we re-calculate back the baud, it would (12000000 /1310= 9160)

MICON : MSP430F5529 IC

Baud_value = ((sys clock) / Baud_rate); => Baud_value = (12000000 / 9600);         => Divisor value is 1250, if we re-calculate back the baud, it would (12000000 /1250= 9600)

Please help in getting more info on the error tolerance.

Thanks.

Best Regards,

Santosh

  • If you have 2 MSP430F5xx devices that exchange data over UART, chose any BR that will give you 0.00 % error, there is no need for standard BR. MSP430 UART can go over 1 Mbps, so don't see any reason for low rate as 9600. If you have XT2 on board, use it for UART clock. For BR calculation you can use setup tool...

    http://forum.43oh.com/topic/2640-uart-configurator

  • zrno soli said:
    MSP430 UART can go over 1 Mbps, so don't see any reason for low rate as 9600

    Unless cable length, thus line capacitance is an issue

  • Santosh PG said:
    If we refer to the user manual of the device the tolerance of the baud rate is very less i.,e +/- 0.05% for 9600 so the range is between ( 9505, 9605)

    Santosh PG said:
    Please help in getting more info on the error tolerance.

    I think you misinterpreted this. The tolerance of +/-0.05% is not the maximum allowed tolerance but the maximum error frequency of the generated baud rate at the given clock frequency and the divider rate.

    The USCI will accept receiving higher % of baud rate error.

  • Hi Leo,

    Thanks for the correction.

    How the devices were able to communicate when the configured frequency was more deviated from the actual frequency??if the datasheet says its +/-0.05% then should not work beyond 12000000+/-6000, please correct if my understanding is wrong?

    Best Regards,

    Santosh.

  • Santosh PG said:
    the datasheet says its +/-0.05% then should not work beyond 12000000+/-6000

    The tolerance of +/-0.05% is the maximal deviation of the USCI’s transmitting baud rate, not receiving.

  • Hi Leo,

    In user manual it is given as reception tolerance.

    Best Regards,

    Santosh

  • Ok your right I was too much focused on transmission only, but it applies to both.

    The tolerance given here is the maximum deviation of the baud rate generator, which applies to both, Tx and Rx. For Rx it’s the maximum error the USCI, himself, will make during reading.

    How much a baud rate may varies between two devices I don’t know. But let’s say its 5% then the transmitting device must be within 5-0.05=4.95%.

  • Hi Leo,

    I agree to your words but how the 4 devices are communicating without error and only 1 has the problem?

    Best Regards,

    Santsoh

  • In your post I can’t see exactly which device (MCU) with which baud rate setting is not working, maybe you could specify this.

    The frequency of the DCO can varying a lot, you theoretical set it to 12MHz or 12.58MHz but in practice it can differs a couple of percents, which can bring it just outside the maximum allowed baud rate tolerance. It’s good to measure your clock frequency or the frequency of your transmitted baud rate and calculate the clock frequency.

  • Hi Leo,

    MSP430F5521 communicates with MSP430F5529.

    BR,

    Santsoh.

  • Santosh PG said:
    only one unit shows the mismatch erro

    Which MCU is this?

    Santosh PG said:

    MICON : MSP430F5521 IC

    Actually micon is operating at 12 Mhz, but the sys clock used for calculating the baud value was wrongly hard coded as 12582912.

    Baud_value = (sys clock) / Baud_rate)  => Baud_value = (12582912 / 9600);         => Divisor value is 1310 , if we re-calculate back the baud, it would (12000000 /1310= 9160)

    MICON : MSP430F5529 IC

    Baud_value = ((sys clock) / Baud_rate); => Baud_value = (12000000 / 9600);         => Divisor value is 1250, if we re-calculate back the baud, it would (12000000 /1250= 9600)

    And which configuration it’s using from these two?


  • Hi,

    We have 2 MSP's and the configurations for each devices are above. First is for F5521 and second for F5529.

    Best Regards,

    Santosh.

  • Santosh PG said:
    how the 4 devices are communicating without error and only 1 has the problem?

    Must I read it so;

    Santosh PG said:

    MICON : MSP430F5521 IC

    Actually micon is operating at 12 Mhz, but the sys clock used for calculating the baud value was wrongly hard coded as 12582912.

    Baud_value = (sys clock) / Baud_rate)  => Baud_value = (12582912 / 9600);         => Divisor value is 1310 , if we re-calculate back the baud, it would (12000000 /1310= 9160)

    MICON : MSP430F5529 IC

    Baud_value = ((sys clock) / Baud_rate); => Baud_value = (12000000 / 9600);         => Divisor value is 1250, if we re-calculate back the baud, it would (12000000 /1250= 9600)

    You have 5 times the above configuration, 4 of these setups working well and one of these has error?

  • Hi,

    We have 5 sets and 4 set with the above config works(one time initialisation of clock is done) and 1 set not works.

    BR,

    Santosh.

  • Ok, now I understand it. Then check clock frequency if possible at one of the port pins ACLK, MCLK or SMCLK directly, otherwise measure transmitting speed and calculate clock frequency. For one device it will be over the edge of the tolerance.

  • There are so many kinds of errors, even for such a simple thing like an UART transfer.

    The maximum allowed receive error is less than 1/2 bit per byte. Since a byte has (usually) 10 bits, it is 1/20= 5%. This is +-5% of the real receiver baudrate. So relative to the receiver clock, not including the clock error and the baudrate divider error.
    The error given in the datasheet, is the relative bit length error, also relative to the transmitter clock, but generated by the baudrate divider and modulation error.
    To allow communication, the absolute clock error must be taken into consideration too. Since one peer might have a clock that is too fast, the other one might have one that is too low. So these errors sum up too.
    Sender clock error and transmit bit time error and receiver clock error together must be below 5% total.

**Attention** This is a public forum