← index #7871Issue #17577
Related · high · value 2.256
QUERY · ISSUE

ESP32C3 timer issue

openby bdambrosioopened 2021-10-02updated 2026-03-24
port-esp32

When using the micropython ble repl example (works on regular esp32), I receive the following error:
dupterm: Exception in write() method, deactivating: Traceback (most recent call last):
File "bluetooth_repl.py", line 74, in write
File "bluetooth_repl.py", line 29, in schedule_in
OSError: (-258, 'ESP_ERR_INVALID_ARG')

this traces back to:
_timer.init(mode=machine.Timer.ONE_SHOT, period=delay_ms, callback=_wrap)

I have tried creating timers from repl for the ESP32C3, and always get the error above on calling init, regardless of the subset of arguments provided or the values used. For reference:

from machine import Timer
t1=Timer(-1)
t1
Timer(3fccd9c0; alarm_en=1073741823, auto_reload=1070351008, counter_en=1070350504)
t1.init(mode=Timer.ONE_SHOT, period=10, callback=p)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: (-258, 'ESP_ERR_INVALID_ARG')

I realize C3 support is a work in progress, and am delighted overall, tnx! Perhaps the timers aren't fully supported yet on this device?

tnx

CANDIDATE · ISSUE

ESP32-C6 timers not working on custom build

closedby AndreoBotelhoopened 2025-06-28updated 2025-08-29
bug

Port, board and/or hardware

esp32-c6 custorm pcb

MicroPython version

MicroPython v1.25.0 on 2025-06-28; ESP32C6 module with ESP32C6

built with espidf v5.3.2 or 5.4.1, trying v1.26 preview form master branch gives same result

Reproduction

  1. create a timer ( 0 or 1)
  2. init it and set a callback
  3. wait for callback result
def mycallback(t):
    print('timer')

tim = Timer(0)

tim.init(period=100, callback=mycallback)

Expected behaviour

Expected print "timer"

Observed behaviour

nothing happens, working fine on espidf 5.2.5

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied