From 4756fb3a51118b5674454a4c8a33174f1cbac9aa Mon Sep 17 00:00:00 2001 From: tkuyucu Date: Thu, 19 Dec 2013 15:53:11 +0100 Subject: [PATCH] timer interrupts implemented correctly. TimeOut and Ticker classes should work. --- .../targets/hal/TARGET_NORDIC/TARGET_nRF51822/us_ticker.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_nRF51822/us_ticker.c b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_nRF51822/us_ticker.c index 188440ef77..63d547ce8a 100644 --- a/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_nRF51822/us_ticker.c +++ b/libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_nRF51822/us_ticker.c @@ -34,6 +34,12 @@ void TIMER1_IRQHandler(void) US_TICKER_TIMER->CC[1] =0;//US_TICKER_TIMER->CC[1]+ 1; } + if ((US_TICKER_TIMER->EVENTS_COMPARE[0] != 0) && + ((US_TICKER_TIMER->INTENSET & TIMER_INTENSET_COMPARE0_Msk) != 0)) + { + us_ticker_irq_handler(); + } + } void us_ticker_init(void)