From 6dc993a2765b22096ec286ba324f9b2229773d43 Mon Sep 17 00:00:00 2001 From: Proddy Date: Tue, 3 Jan 2023 14:48:48 +0100 Subject: [PATCH] add note to investigate xTaskSuspend and static buffer size --- src/uart/emsuart_esp32.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/uart/emsuart_esp32.cpp b/src/uart/emsuart_esp32.cpp index bdbf34ded..26ee336ae 100644 --- a/src/uart/emsuart_esp32.cpp +++ b/src/uart/emsuart_esp32.cpp @@ -87,6 +87,8 @@ void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t uart_driver_install(EMSUART_NUM, 129, 0, (EMS_MAXBUFFERSIZE + 1) * 2, &uart_queue, 0); // buffer must be > fifo uart_set_rx_full_threshold(EMSUART_NUM, 1); uart_set_rx_timeout(EMSUART_NUM, 0); // disable + + // note setting the static max buffer to 1024 causes OTA to fail xTaskCreate(uart_event_task, "uart_event_task", 2048, NULL, configMAX_PRIORITIES - 1, NULL); } tx_mode_ = tx_mode; @@ -99,6 +101,7 @@ void EMSuart::start(const uint8_t tx_mode, const uint8_t rx_gpio, const uint8_t void EMSuart::stop() { if (tx_mode_ != 0xFF) { // only call after driver initialisation uart_disable_intr_mask(EMSUART_NUM, UART_BRK_DET_INT_ENA | UART_RXFIFO_FULL_INT_ENA); + // TODO should we xTaskSuspend() the event task here? } };