When I do esp_wifi_connect, the RMT buffer overflows. If I wait 5000ms after calling esp_wifi_connect before starting the task_RMT_Rx, all behaves well, but I want to handle the situation so that WiFi can start and stop and not upset RMT.
This works:
Code: Select all
ESP_ERROR_CHECK( esp_wifi_connect() );
vTaskDelay(5000);
xTaskCreate(task_RMT_Rx, "RMTFFS", 2048, NULL, 5, NULL);
Code: Select all
xTaskCreate(task_RMT_Rx, "RMTFFS", 2048, NULL, 5, NULL);
ESP_ERROR_CHECK( esp_wifi_connect() );
I am going to investigate esp_wifi_connect code, but am still getting used to freeRTOS and how to properly get tasks to yield without introducing too much latency but also avoiding watchdog warnings. I am wondering if I need to do an HRT callback instead of a freeRTOS task to be certain my task_RMT_Rx will run reliably.