![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
John A
Yup, you should give platformIO a try. you can do both with it IDF and ADF. Though i will send a word of caution though with ADF and I2C. In my first days using ADF i liked it because of the ease of OTA over the air that platformIO implements. Over time I have seen many times I2C get choked up. But when using IDF its been a rock. So I no longer do ADF anymore. Not to mention using ADF is a pig on flash and ram.I learned something today. I didn't realize that FreeRTOS ran in the Aurduino environment.
Were your failures random? I am still trying to narrow things down. I have built several of my project up just so I can possibly troubleshoot quicker since sometime it can run for days without a failure. This has put me back a week trying to figure this one out. I will see if I can try using a semaphore. Did your task completely halt when you had a problem?
FYI vTaskDelay is exactly the way ESP32 implements delay in Arduino.
Code: Select all
void delay(uint32_t ms)
{
vTaskDelay(ms / portTICK_PERIOD_MS);
}
Code: Select all
void IRAM_ATTR delayMicroseconds(uint32_t us)
{
uint32_t m = micros();
if(us){
uint32_t e = (m + us);
if(m > e){ //overflow
while(micros() > e){
NOP();
}
}
while(micros() < e){
NOP();
}
}
}
Users browsing this forum: Bing [Bot], Google [Bot] and 68 guests