QUERY · ISSUE
ESP32_C3: timer_group: timer_init(271): HW TIMER NUM ERROR
bugport-esp32
from machine import*
tim = Timer(-1)
tim.init(period=1000,callback = lambda t:print('rtos'))
E (6078630) timer_group: timer_init(271): HW TIMER NUM ERROR
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: (-258, 'ESP_ERR_INVALID_ARG')
I found out that virtual timer is not available in ESP32_C3 chip.
CANDIDATE · ISSUE
esp32: Virtual timers not currently supported in doc
According to this page: http://docs.micropython.org/en/latest/esp32/quickref.html#timers virtual timers are not supported.
But it seems to work in real life with a -1 timer.
Is it a problem of documentation update?
from machine import Timer
t = Timer(-1)
t.init(period=1000, mode=Timer.PERIODIC, callback=lambda t:print("Working"))
while True:
pass
Working
Working
Working
...