I am trying to set it with param_config and set_baudrate, but neither work. Calling uart_set_baudrate with 5000000 causes a panic.
Am I missing a step to the ritual?
Code: Select all
const uart_config_t uart_config = {
.baud_rate = 5000000,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
};
ESP_ERROR_CHECK( uart_param_config(UART_NUM_1, &uart_config) );
ESP_ERROR_CHECK( uart_set_baudrate(UART_NUM_1, 5000000) );
ESP_ERROR_CHECK( uart_set_pin(UART_NUM_1, 17, 16, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE) );
ESP_ERROR_CHECK( uart_driver_install(UART_NUM_1, 1024, 1024, 0, NULL, 0) );