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.

CC2541: CC2541: UART baud rate change

Part Number: CC2541

Using CC2541 and an external modem.

We are launching our code with default 115200 Baud rate.   We need to use that rate to give our modem a command to lower its Baud rate to 38400.  Once that command is issued,  we need to lower the CC2541 rate to 38400.

Can't figure out how to dynamically change baud rate once the CC2541 is already running.

Assistance appreciated.

Thanks.

  • Hi Daniel,

    I recommend you start looking at the usage example in the following link:

    dev.ti.com/.../_u_a_r_t_8h.html

    You can see how it's setup in the usage example.

    Regarding your use case, you'll need to set it up initially at the 115200 baud rate you need, once you're finish with that, you'll need to close that UART instance using UART_close() (documented in the same link I provided above) to free that same UART channel and reconfigure it to the desired baud rate.

    Regards,

    Jesus

  • I suppose you can re-initialize UART again with new baud rate when you intend to change it.