Skip to main content
Visitor II
June 20, 2006
Question

Change Baudrate of UART in Application

  • June 20, 2006
  • 2 replies
  • 786 views
Posted on June 20, 2006 at 04:14

Change Baudrate of UART in Application

    This topic has been closed for replies.

    2 replies

    wolf2Author
    Visitor II
    June 15, 2006
    Posted on June 15, 2006 at 14:26

    Dear RISC:

    I develop an application.

    9600 is the default of both Host and Client.

    Host sends command let Client changes to 115200.

    Client uses 9600 respone ACK to Host. Wait TXEmpty on , Client changes to 115200.

    Question:

    What is the flow which changes from 9600 to 115200 ?

    How many time is need to wait ?

    Because:

    I set a breakpoint at TXEmpty , Stop and Run. It is OK.

    If no breakpoint , Host needs to retry 2 or 3 times.

    Thank you.

    wolf2Author
    Visitor II
    June 20, 2006
    Posted on June 20, 2006 at 04:14

    Thank you.

    Because our project is so huge.

    We are follow the ModBus like Protocol.

    ex:

    We define :

    0 : 9600(default)

    1 : 19200

    2 : 38400

    3 : 57600

    4 : 115200

    function code : 0x32

    PC -> :013204xx (9600)

    ST -> :013204xx (echo 9600 ok)

    I wait TXEmpty launched.

    Change Baudrate to 115200.(PC & ST)

    Both PC & ST delay 1 second

    PC -> :0103xxxx... (115200 request,it will timeout one or two times)

    After retry one or two times, ST responds correctly.

    I want to know what I need to do, when I pre-change or post-change baudrate ?

    Like Stop RX or.......

    Thank you.