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.