Skip to content

Commit

Permalink
add note to investigate xTaskSuspend and static buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Jan 3, 2023
1 parent c45ceec commit 6dc993a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/uart/emsuart_esp32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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?
}
};

Expand Down

0 comments on commit 6dc993a

Please sign in to comment.