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.

TMS320F28027: F2802x SCI baud rate issue

Part Number: TMS320F28027
Other Parts Discussed in Thread: CONTROLSUITE

Hello Champs,

I have tested on F28027 Launchpad that if the PC(host) baud rate has been set as integer multiple of the SCI baud rate, for example, the host is 115200 and F28027 SCI is 9600 (115200/9600 = 12), the SCI frame error bit will be seldom set, that is to say, at most conditions there is no frame error and also no any other SCI errors while at the same time the received error is wrong.

Would you please kindly suggest how to recognize this kind of error without any error bit set? Thanks!

Best Regards,

Linda

  • Linda,

    The SCI module samples at the SCICLK period(8 samples during each bit time). If it sees 4 consecutive low values then it detects a start bit. The Framing Error cannot occur unless a start bit is detected.

    What I think I going on: Because your data is so much faster than the SCICLK it is likely pretty random which value is sampled...the sampled values are not from the same message. If the SCI happens to sample 4 consecutive low values then it detects a start bit, gathers some garbage data, and likely misses the stop bit causing the Frame Error bit to be set. I would expect this to occur P(0)^4 where P(0) is the probability of a 0 occurring at any given time. If you are sending data with a lot of 1's or have long times between messages then I would expect this to occur very infrequently.

    Have you considered using the Autobaud detection?

    Regards,
    Cody

  • Linda,

    Linda Zhang84708 said:

    Regarding this issue, customer cannot accept to use Auto baud detection, would you please kindly suggest whether other software error detecting method can be used or not?

    When using the UART protocol it is up to the user to define the baud rate settings. The SCI module is able to detect if a message's baud rate is too slow, but  not if it is too fast. To help the user detect these issues several flags exist Framing Error and Break Detect for example. It would then be up to the application code to correct the issue, we have provided the auto baud feature to help the user determine the correct baud rate, but that requires the transmitter to send a known value.

    I don't know of any good software solutions, however I think it would be possible to observe the incoming data using the eCAP module and determine the correct baud rate. That however would still require the transmitter to be sending a known signal, very similar to the auto baud detection.

    In conclusion: there is not a good way to detect a transmitter that has a Baud rate that is configured too quickly. It is up to the user to ensure this wont happen, or develop a solution that will periodically check that the baud rates have not been misconfigured.

    Regards,
    Cody

  • Hello Cody,

    Would you please kindly suggest whether there are example codes to observe the incoming data using the eCAP module and determine the correct baud rate or not? Thanks!

    Best Regards,
    Linda
  • Linda,

    I want to first point out that this is not a software only fix. This will require some external hardware and validation by the customer.

    We don't have a controlSuite example of this as it's not a standard use case, however <controlSUITE>\device_support\f28m35x\v210\F28M35x_examples_Control\ecap_capture_pwm should show you how to setup the eCAP module.

    UART is not designed for this kind of error detection, if the customer requires this kind of error detection maybe SPI or other synchronous protocol will work better for them.

    Hope it helps,
    Cody