Open RJSDevel opened 11 months ago
Hi @RJSDevel, please check our API reference (https://docs.espressif.com/projects/esp-idf/en/latest/esp32h2/api-reference/peripherals/uart.html#_CPPv419uart_driver_install11uart_port_tiiiP13QueueHandle_ti). We specify the requirements for tx_buffer_size
and rx_buffer_size
input parameters. UART_HW_FIFO_LEN
is 128 on ESP32H2.
Answers checklist.
IDF version.
v5.1.1 to v5.1.2
Espressif SoC revision.
ESP32-H2
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
None
Development Kit.
CUSTOM
Power Supply used.
USB
What is the expected behavior?
No this error
What is the actual behavior?
UART driver error
Steps to reproduce.
define PM1006K_BUFFER_LENGTH 20
uart_config_t uart_config = { .baud_rate = 9600, .data_bits = UART_DATA_8_BITS, .parity = UART_PARITY_DISABLE, .stop_bits = UART_STOP_BITS_1, .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, };
Debug Logs.
More Information.
If I just commit ESP_RETURN_ON_FALSE((rx_buffer_size > SOC_UART_FIFO_LEN), ESP_FAIL, UART_TAG, "uart rx buffer length error"); ESP_RETURN_ON_FALSE((tx_buffer_size > SOC_UART_FIFO_LEN) || (tx_buffer_size == 0), ESP_FAIL, UART_TAG, "uart tx buffer length error");
then everything is Ok