loboris / MicroPython_ESP32_psRAM_LoBo

MicroPython for ESP32 with psRAM support
Other
831 stars 344 forks source link

Missed callback events when using Timer #261

Closed dukeduck1984 closed 5 years ago

dukeduck1984 commented 5 years ago

Hi,

I have 4 timers running in extended mode. All had issues of missed callback events - about 60% of the callbacks were missed.

One of the timer watches press action of 3 buttons, and the period was set to 10ms - according to the Wiki, some will miss, but I didn't except such high ratio.

And a timer for refreshing the OLED display every 100ms had higher missing ratio (about 70% was missed).

Another timer performs a battery level check using ADC, and the function was called every 3mins, and this one was ridiculous - all 3 calls were missed in 10min.

The firmware version is MicroPython ESP32_LoBo_v3.2.24.

What could be the reason? Thanks for the help in advance.

Kaiyuan

taitix commented 5 years ago

Maybe related to this issue? : https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/issues/71

dukeduck1984 commented 5 years ago

I figured it out. The it took a while for the ADC to return the value, which caused other timer's callback failed to perform.

I will close this issue.