I am practicing with the latest RTOS SDK. I have created an application which creates a task and in that task I display some data and then sleep and then loop some more repeating the display/sleep pair. When I run the application, it displays between 8-20 iterations from the loop and then WDT resets. Then it may do this for 3 or 4 more times and then seems to "lock up". I am unable to see any logic errors in my coding. Am I mistaken in assuming that a call to vTaskDelay() suspends the current running task allowing the RTOS and other tasks to get control?
Here is my application:
Code: Select all
#include "esp_common.h"
void taskConnect(void *pData) {
printf("Hello from taskConnect!\n");
int count = 0;
while(1) {
count++;
printf("count - %d\n", count);
vTaskDelay(10);
}
}
void user_init(void) {
printf("SDK version:%s\n", system_get_sdk_version());
printf("user_init running ...\n");
wifi_set_opmode(NULL_MODE);
xTaskCreate(taskConnect, "taskConnect", 200, NULL, 3, NULL);
}