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.

How to change the baud rate in MSP430F6438 with SPPLEDemo_lite ?

Other Parts Discussed in Thread: MSP430F6438

I am developing BLE in MSP430F6438 + CC5640 with IAR SPPLEDemo_lite Project.

The SPPLEDemo_lite project initial the UART at the begin via following code:

HAL_CommConfigure(BT_DEBUG_UART_BASE, BT_DEBUG_UART_BAUDRATE, 0);
GPIOPinTypeUART(BT_DEBUG_UART_PIN_BASE, BT_DEBUG_UART_PIN_TX_MASK, BT_DEBUG_UART_PIN_RX_MASK);

/* Enable Debug UART Receive Interrupt. */
UARTIntEnableReceive(BT_DEBUG_UART_BASE);

I want to change different baud rate of UART after initial the UART when receive different for BLE data.

For example , The default baud rate is 9600. when I receive 0x01 from BLE , the baud rate change to 115200. 

 

1. How to change baud rate dynamic in SPPLEDemo_lite ? ot Which function can I use to change baud rate ?

2. After setting the new baud rate , should I restart the device ?

3. After change the new baud rate , how to save it to the memory and let the device use the new baud rate when turn on next time ?

Thanks in advance.

  • Hi Wun,

    You can set up your receive ISR in your MSP code to change the baud rate. After changing the baud rate, you should reset the UART module.

    Please refer to section 39.3.10 (page 1038) in the user's guide for information on setting a baud rate. Section 39.3.13 (page 1040) mentions the settings for typical baud rates and also includes a table for those settings. www.ti.com/.../slau208o.pdf

    You can save this baud rate setting to non-volatile memory and then have the device read the baud rate from this memory when turning on.

    Regards,
    Akash Patel

**Attention** This is a public forum