Why this code freeze the loop?
Code: Select all
printf("Start\n");
while(1)
//while (!gpio_get_level(CLOSESWITCH))
{
printf("%d\n", curServoPos);
//curServoPos -= changeDelta;
/*ledc_set_duty(LEDC_HIGH_SPEED_MODE, LEDC_CHANNEL_0, curServoPos);
ledc_update_duty(LEDC_HIGH_SPEED_MODE, LEDC_CHANNEL_0);
vTaskDelay(VALUECHANGERATE / portTICK_PERIOD_MS);
if(gpio_get_level(CLOSESWITCH)) break;*/
vTaskDelay(20 / portTICK_PERIOD_MS);
}
printf("Val %d\n", curServoPos);
Code: Select all
Start
2500
2500
2500
2500
2500
2500
2500
2500
2500
2500
2500
2500
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: blinkLed
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: blinkLed
CPU 1: IDLE
Task watchdog got triggered. The following tasks did not reset the watchdog in time:
- IDLE (CPU 0)
Tasks currently running:
CPU 0: blinkLed
CPU 1: IDLE
So, I've seen that none of those lines have problems.
I don't understand.
Is this a bug?
Thanks.
Best regards.
Stefano