You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, DFU ( device firmware upgrade ) is a CPU intensive task. I'll soon add callbacks to ElegantOTA so that users can pause all timers and tasks gracefully before the OTA starts.
Hey, did you find a solution to this problem? My device highly depends upon Hardware Timer and I want to add the feature of OTA updates. @jlfrucot@ayushsharma82
Maybe not an issue !
The use of hardware timer blocks OTA update. This may solved by settings this timer in IRAM with IRAM_ATTR like in this example :
`int16_t tempsRestant = timeToGo;
hw_timer_t *Chrono_timer = NULL;
portMUX_TYPE timerChronoMux = portMUX_INITIALIZER_UNLOCKED;
bool ChronoIsRunning = false;
IRAM_ATTR void Chrono_decremente()
{
portENTER_CRITICAL_ISR(&timerChronoMux);
tempsRestant--;
portEXIT_CRITICAL_ISR(&timerChronoMux);
}
IRAM_ATTR hw_timer_t * Chrono_init(uint16_t time)
{
tempsRestant = time;
Chrono_timer = timerBegin(2, 80, true);
timerAttachInterrupt(Chrono_timer, &Chrono_decremente, true);
timerAlarmWrite(Chrono_timer, 1000000, true);
timerAlarmEnable(Chrono_timer);
return Chrono_timer;
}
`
The text was updated successfully, but these errors were encountered: