File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52 Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ void us_ticker_init(void)
77
77
78
78
nrf_timer_frequency_set (NRF_TIMER1 , NRF_TIMER_FREQ_1MHz );
79
79
80
- nrf_timer_bit_width_set (NRF_TIMER1 , NRF_TIMER_BIT_WIDTH_16 );
80
+ nrf_timer_bit_width_set (NRF_TIMER1 , NRF_TIMER_BIT_WIDTH_32 );
81
81
82
82
nrf_timer_cc_write (NRF_TIMER1 , NRF_TIMER_CC_CHANNEL0 , 0 );
83
83
@@ -110,7 +110,7 @@ void us_ticker_set_interrupt(timestamp_t timestamp)
110
110
{
111
111
core_util_critical_section_enter ();
112
112
113
- nrf_timer_cc_write (NRF_TIMER1 , NRF_TIMER_CC_CHANNEL0 , timestamp & 0xFFFF );
113
+ nrf_timer_cc_write (NRF_TIMER1 , NRF_TIMER_CC_CHANNEL0 , timestamp );
114
114
115
115
if (!nrf_timer_int_enable_check (NRF_TIMER1 , nrf_timer_compare_int_get (NRF_TIMER_CC_CHANNEL0 ))) {
116
116
nrf_timer_event_clear (NRF_TIMER1 , NRF_TIMER_EVENT_COMPARE0 );
Original file line number Diff line number Diff line change 18
18
#define US_TICKER_H
19
19
20
20
/* TIMER0 is reserved for SoftDevice. We will use TIMER1 for us ticker
21
- * which counter size is 16 bits. */
21
+ * which counter size is 32 bits. */
22
22
23
- #define US_TICKER_COUNTER_BITS 16u
23
+ #define US_TICKER_COUNTER_BITS 32u
24
24
#define US_TICKER_FREQ 1000000
25
25
26
26
#endif // US_TICKER_H
You can’t perform that action at this time.
0 commit comments