Closed frco9 closed 9 years ago
Quick question: Why do we need to disable user's timer?
I'm not sure that it's linked, but I have two timers triggered every 100ms (Button sampling and RTC update) and as long as they were enabled, my FOTA update was failing (the firmware download was extremely slow and timed out). Now it's working great.
I suggest that this is not good way for the system to run. FOTA should run in background, and have least interaction with the rest of the system.
How about disable the interrupt when downloading new image?
/* disable all interrupts */
#define ETS_INTR_LOCK() ets_intr_lock()
/* enable all interrupts */
#define ETS_INTR_UNLOCK() ets_intr_unlock()
Indeed, this is what I was looking for !
Add a callback to fota in order to disable user's timers during FOTA update.