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.

SIMPLELINK-MSP432-SDK: Changing the params of a uart by software

Part Number: SIMPLELINK-MSP432-SDK


Hi, we use a msp432p4011 and want to change the baudrate while the software is running. We did something like:

Build with SIMPLELINK MSP43P4 3.40.1.02, TIv20.2.5 LTS.

The uart is initialy running ok at 115200 baud! With flags we hold the transmission on both sides, then we call: 

int8_t reconfigureUart(uint32_t baudrate) {

// Close the uart
UART_close(hUart_RS485);

hUart_RS485 = NULL;

// Reconfigure RS485
uartParams.writeDataMode = UART_DATA_BINARY;
uartParams.readDataMode = UART_DATA_BINARY;
uartParams.readReturnMode = UART_RETURN_FULL;
uartParams.readEcho = UART_ECHO_OFF;
uartParams.readMode = UART_MODE_BLOCKING;
uartParams.writeMode = UART_MODE_BLOCKING;
uartParams.readCallback = NULL;
uartParams.writeCallback = NULL;
uartParams.baudRate = baudrate;
uartParams.dataLength = UART_LEN_8; /* Default */
uartParams.parityType = UART_PAR_EVEN; /* Default = UART_PAR_NONE */
uartParams.stopBits = UART_STOP_ONE; /* Default */

hUart_RS485 = UART_open(CONFIG_UART_RS485_TX_1, &uartParams);

if (hUart_RS485 == NULL) {
/* UART_open() failed */
displayDebug0("UART_open RS485 failed!");
return FAILURE;
}

// Disable receiver, enabling low power management
// UART_control(hUart_RS485, UART_CMD_RXDISABLE, 0);

return SUCCESS;
}

The only thing changing is the 'baudrate', the routine above runs ok but does not result in something working! We seem to miss something?

rgds,

Laurent