I'm working on an AWS IoT project where the MQTT routines, callback lambdas and kind of everything else apart from initialisation are inside a task created by xTaskCreatePinnedToCore()
.
This task does few things: connect to AWS, subscribe to topics and then it enters into an infinite loop where it calls aws_iot_mqtt_yield
checks for errors etc. In each loop I also call: vTaskDelay(10 / portTICK_RATE_MS);
. It is from an example project where the delay was 1 sec which I then decreased to 10ms. What is a 'healthy' delay? Why do we even need a delay here? Thanks!