- Modified app_main to Pin "https_get_task" to CPU1 (see below)
- Added a printf to print the available heap before each "Starting again!"
- Did a "make erase_flash" - then "make flash" and "make monitor"
...For about 30 minutes. Then "https_get_task" hangs while app_main keeps running. I think both times "https_get_task" hung at "Performing the SSL/TLS handshake..." The second time it was at 31:49.
Any idea what's going on here? The Free Heap size was: 191364, so I don't think its a lack of memory. Is it possible that some timer kills tasks? So possibly we need to kill and re-create them every 30 minutes?
Code: Select all
void app_main()
{
ESP_ERROR_CHECK( nvs_flash_init() );
initialise_wifi();
// xTaskCreate(&https_get_task, "https_get_task", 8192, NULL, 5, NULL);
xTaskCreatePinnedToCore(&https_get_task, "https_get_task", 8192, NULL, 5, NULL, 1);
while (1) {
vTaskDelay(100/portTICK_PERIOD_MS);
print_time();
}
}