UART "Pattern Queue Size too small"
Posted: Thu Aug 04, 2022 7:17 am
I have a wroom32E linked to a bluepill board. From bluepill a receive a 100 chars long message with 30 Hz frequency via UART. Randomly I have the debug message "Pattern Queue Size too small" and I loose a bluepill message.
Have you some ideas how to solve?
The UART configuration is:
#define BLUEPILL_UART_PORT UART_NUM_2
#define BLUEPILL_UART_RXD_PIN (GPIO_NUM_16) // GPIO per UART2 su WROOM-32E
#define BLUEPILL_UART_TXD_PIN (GPIO_NUM_17) // GPIO per UART2 su WROOM-32E
#define BLUEPILL_UART_RX_BUFFER_SIZE 2048
#define BLUEPILL_UART_TX_BUFFER_SIZE 2048
#define BLUEPILL_UART_EVENT_QUEUE_SIZE 32
#define BLUEPILL_UART_BAUDRATE 460800
#define BLUEPILL_UART_TASK_STACK_SIZE 2048
#define BLUEPILL_UART_TASK_PRIORITY 12
#define BLUEPILL_PARSER_RING_BUFFER_SIZE 2048
#define BLUEPILL_PARSER_TASK_STACK_SIZE (BLUEPILL_PARSER_RING_BUFFER_SIZE*2)
#define BLUEPILL_PARSER_TASK_PRIORITY configMAX_PRIORITIES
#define BLUEPILL_PARSER_RUNTIME_BUFFER_SIZE (BLUEPILL_PARSER_RING_BUFFER_SIZE / 2)
#define BLUEPILL_EVENT_LOOP_QUEUE_SIZE (32)
/**
* @brief Default configuration for bluepill Parser
*
*/
#define BLUEPILL_UART_CONFIG_DEFAULT() \
{ \
.uart = { \
.uart_port = BLUEPILL_UART_PORT, \
.rx_pin = BLUEPILL_UART_RXD_PIN, \
.tx_pin = BLUEPILL_UART_TXD_PIN, \
.baud_rate = BLUEPILL_UART_BAUDRATE, \
.data_bits = UART_DATA_8_BITS, \
.stop_bits = UART_STOP_BITS_1, \
.parity = UART_PARITY_DISABLE, \
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \
.source_clk = UART_SCLK_APB, \
.event_queue_size = BLUEPILL_UART_EVENT_QUEUE_SIZE, \
.rx_buffer_size = BLUEPILL_UART_RX_BUFFER_SIZE, \
.tx_buffer_size = BLUEPILL_UART_TX_BUFFER_SIZE, \
.rts_io_num = UART_PIN_NO_CHANGE, \
.cts_io_num = UART_PIN_NO_CHANGE, \
} \
}
Thanks
Have you some ideas how to solve?
The UART configuration is:
#define BLUEPILL_UART_PORT UART_NUM_2
#define BLUEPILL_UART_RXD_PIN (GPIO_NUM_16) // GPIO per UART2 su WROOM-32E
#define BLUEPILL_UART_TXD_PIN (GPIO_NUM_17) // GPIO per UART2 su WROOM-32E
#define BLUEPILL_UART_RX_BUFFER_SIZE 2048
#define BLUEPILL_UART_TX_BUFFER_SIZE 2048
#define BLUEPILL_UART_EVENT_QUEUE_SIZE 32
#define BLUEPILL_UART_BAUDRATE 460800
#define BLUEPILL_UART_TASK_STACK_SIZE 2048
#define BLUEPILL_UART_TASK_PRIORITY 12
#define BLUEPILL_PARSER_RING_BUFFER_SIZE 2048
#define BLUEPILL_PARSER_TASK_STACK_SIZE (BLUEPILL_PARSER_RING_BUFFER_SIZE*2)
#define BLUEPILL_PARSER_TASK_PRIORITY configMAX_PRIORITIES
#define BLUEPILL_PARSER_RUNTIME_BUFFER_SIZE (BLUEPILL_PARSER_RING_BUFFER_SIZE / 2)
#define BLUEPILL_EVENT_LOOP_QUEUE_SIZE (32)
/**
* @brief Default configuration for bluepill Parser
*
*/
#define BLUEPILL_UART_CONFIG_DEFAULT() \
{ \
.uart = { \
.uart_port = BLUEPILL_UART_PORT, \
.rx_pin = BLUEPILL_UART_RXD_PIN, \
.tx_pin = BLUEPILL_UART_TXD_PIN, \
.baud_rate = BLUEPILL_UART_BAUDRATE, \
.data_bits = UART_DATA_8_BITS, \
.stop_bits = UART_STOP_BITS_1, \
.parity = UART_PARITY_DISABLE, \
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE, \
.source_clk = UART_SCLK_APB, \
.event_queue_size = BLUEPILL_UART_EVENT_QUEUE_SIZE, \
.rx_buffer_size = BLUEPILL_UART_RX_BUFFER_SIZE, \
.tx_buffer_size = BLUEPILL_UART_TX_BUFFER_SIZE, \
.rts_io_num = UART_PIN_NO_CHANGE, \
.cts_io_num = UART_PIN_NO_CHANGE, \
} \
}
Thanks