UART0 rx data
Posted: Mon Jun 08, 2020 4:38 pm
in version 3.3.1 rxdata could be received and processed, allowing for a user test menu to be utilised.
I upgraded to ver 3.3.2 today and data is not being received.
Does anyone know what has changed?
And if there is a simple fix please.
UART0 init
to access input data
to print to the uart (output mixed with log data)
I upgraded to ver 3.3.2 today and data is not being received.
Does anyone know what has changed?
And if there is a simple fix please.
UART0 init
Code: Select all
uart_config_t uart_config = {
.baud_rate = 115200,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE
};
uart_param_config(UART_NUM_0, &uart_config);
uart_set_pin(UART_NUM_0, TXD_PIN, RXD_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_driver_install(UART_NUM_0, RX_BUF_SIZE * 2, 0, 0, NULL, 0);
// setvbuf(stdout, NULL, _IONBF, 0);
setbuf(stdout, NULL);
ESP_LOGI(TAG, "UART0 initialise\r\n");
Code: Select all
rx_cnt = uart_read_bytes(UART_NUM_0, buf, length, ticks_to_wait);
Code: Select all
int menu_printf(const char *fmt, ...)
{
int str_len;
va_list args;
va_start(args, fmt);
str_len = vprintf (fmt, args); //to uart0
va_end (args);
return(str_len);
}