diff --git a/ports/psoc6/modules/machine/machine_timer.c b/ports/psoc6/modules/machine/machine_timer.c index 94b927178590..d5d87a31021e 100644 --- a/ports/psoc6/modules/machine/machine_timer.c +++ b/ports/psoc6/modules/machine/machine_timer.c @@ -23,7 +23,6 @@ typedef struct _machine_timer_obj_t { const mp_obj_type_t machine_timer_type; static void isr_timer(void *callback_arg, cyhal_timer_event_t event) { - mp_printf(&mp_plat_print, "Here isr"); machine_timer_obj_t *self = callback_arg; mp_sched_schedule(self->callback, MP_OBJ_FROM_PTR(self)); } diff --git a/tests/psoc6/timer.py b/tests/psoc6/timer.py new file mode 100644 index 000000000000..7acef9376b0d --- /dev/null +++ b/tests/psoc6/timer.py @@ -0,0 +1,6 @@ +import time +from machine import Timer + +t = Timer(0) +t.init(period=2000, mode=Timer.ONE_SHOT, callback=lambda t: print("hello")) +time.sleep_ms(3000) diff --git a/tests/psoc6/timer.py.exp b/tests/psoc6/timer.py.exp new file mode 100644 index 000000000000..ce013625030b --- /dev/null +++ b/tests/psoc6/timer.py.exp @@ -0,0 +1 @@ +hello