Skip to content

Commit a5d4690

Browse files
committed
Merge branch 'fix/utask_overflow_if_at_debug' into 'master'
fix(uart): Fixed uart task task overflow if AT_DEBUG is enabled See merge request application/esp-at!2061
2 parents fc3628b + 5d7d800 commit a5d4690

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

main/interface/uart/at_uart_task.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@
2424
#include "at_uart.h"
2525
#include "esp_at_interface.h"
2626

27+
#if CONFIG_AT_DEBUG
28+
#define ESP_AT_UART_TASK_STACK_SIZE esp_at_max(4096, CONFIG_AT_UART_TASK_STACK_SIZE)
29+
#else
30+
#define ESP_AT_UART_TASK_STACK_SIZE CONFIG_AT_UART_TASK_STACK_SIZE
31+
#endif
32+
2733
// static variables
2834
static QueueHandle_t s_at_uart_queue = NULL;
2935
static TaskHandle_t s_task_handle = NULL;
@@ -194,7 +200,7 @@ static void at_uart_init(void)
194200
#else
195201
ESP_AT_LOGI(TAG, "AT log port:uart%d baudrate:%d", CONFIG_ESP_CONSOLE_UART_NUM, CONFIG_ESP_CONSOLE_UART_BAUDRATE);
196202
#endif
197-
xTaskCreate(at_uart_task, "uTask", CONFIG_AT_UART_TASK_STACK_SIZE, NULL, 1, &s_task_handle);
203+
xTaskCreate(at_uart_task, "uTask", ESP_AT_UART_TASK_STACK_SIZE, NULL, 1, &s_task_handle);
198204
}
199205

200206
void at_uart_transmit_mode_switch_cb(esp_at_status_t status)

0 commit comments

Comments
 (0)