From 7e69d30c027659540860af894342872129e4343f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 3 Apr 2020 14:22:56 -0700 Subject: [PATCH] Fix nRF PulseIn --- ports/nrf/common-hal/pulseio/PulseIn.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/nrf/common-hal/pulseio/PulseIn.c b/ports/nrf/common-hal/pulseio/PulseIn.c index 55ca956ff7..be2903e444 100644 --- a/ports/nrf/common-hal/pulseio/PulseIn.c +++ b/ports/nrf/common-hal/pulseio/PulseIn.c @@ -152,7 +152,8 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t* self, const mcu nrfx_timer_init(timer, &timer_config, &timer_overflow_event_handler); // Interrupt on overflow so we can track when it rolls over. - nrfx_timer_compare(timer, 0, 0, true); + nrfx_timer_compare(timer, NRF_TIMER_CC_CHANNEL0, 0, true); + nrfx_timer_resume(timer); } refcount++;