File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
targets/TARGET_NORDIC/TARGET_NRF5_SDK13 Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 41
41
#include "app_util.h"
42
42
#include "nrf_drv_common.h"
43
43
#include "lp_ticker_api.h"
44
+ #include "mbed_critical.h"
44
45
45
46
#if defined(NRF52_ERRATA_20 )
46
47
#include "softdevice_handler.h"
@@ -531,7 +532,7 @@ static void register_next_tick()
531
532
// the RTC1 keeps running.
532
533
// This code is very short 20-38 cycles in the worst case, it shouldn't
533
534
// disturb softdevice.
534
- __disable_irq ();
535
+ core_util_critical_section_enter ();
535
536
uint32_t current_counter = nrf_rtc_counter_get (COMMON_RTC_INSTANCE );
536
537
537
538
// If an overflow occur, set the next tick in COUNTER + delta clock cycles
@@ -543,7 +544,7 @@ static void register_next_tick()
543
544
// Enable generation of the compare event for the value set above (this
544
545
// event will trigger the interrupt).
545
546
nrf_rtc_event_enable (COMMON_RTC_INSTANCE , OS_TICK_INT_MASK );
546
- __enable_irq ();
547
+ core_util_critical_section_exit ();
547
548
}
548
549
549
550
/**
You can’t perform that action at this time.
0 commit comments