Search found 1 match
- Tue Mar 19, 2024 6:46 am
- Forum: ESP-IDF 中文讨论版
- Topic: rx_task栈空间不足***ERROR*** A stack overflow in task uart_rx_task has been detected.
- Replies: 0
- Views: 1936
rx_task栈空间不足***ERROR*** A stack overflow in task uart_rx_task has been detected.
static void rx_task(void *arg) { static const char *RX_TASK_TAG = "RX_TASK"; esp_log_level_set(RX_TASK_TAG, ESP_LOG_INFO); uint8_t* RXdata = (uint8_t*) malloc(RX_BUF_SIZE+1); while (1) { const int rxBytes = uart_read_bytes(UART_NUM_2, RXdata, RX_BUF_SIZE, 2000 / portTICK_PERIOD_MS); if (rxBytes > 0...