Skip to content

Commit 02d7d25

Browse files
committed
us_ticker_set_interrupt: fix bit-shift operation
1 parent 80fabcb commit 02d7d25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_NORDIC/TARGET_NRF5x/us_ticker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
110110
{
111111
core_util_critical_section_enter();
112112

113-
const uint32_t counter_mask = ((1 << US_TICKER_COUNTER_BITS) - 1);
113+
const uint32_t counter_mask = ((1ULL << US_TICKER_COUNTER_BITS) - 1);
114114

115115
nrf_timer_cc_write(NRF_TIMER1, NRF_TIMER_CC_CHANNEL0, timestamp & counter_mask);
116116

0 commit comments

Comments
 (0)