Skip to content

Commit 9966110

Browse files
committed
NRF_52840: Fix us ticker counter size
It has been noticed that there is a problem with us ticker on NRF_52840 board after 32 bit counter has been used for us ticker on NRF52 family boards. Currently NRF52 symbol is defined only for MCU_NRF52832 (not for MCU_NRF52840) and based on this symbol 16 or 32 bit counter is selected (16 bit for NRF51 family and 32 for NRF52 family). Since MCU_NRF52840 defines NRF52840_XXAA and provides 32 bit counters, 32 bit counter should be selected also when NRF52840_XXAA symbol is defined.
1 parent 8e170cc commit 9966110

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
@@ -77,7 +77,7 @@ void us_ticker_init(void)
7777

7878
nrf_timer_frequency_set(NRF_TIMER1, NRF_TIMER_FREQ_1MHz);
7979

80-
#ifdef NRF52
80+
#ifdef TARGET_NRF52
8181
nrf_timer_bit_width_set(NRF_TIMER1, NRF_TIMER_BIT_WIDTH_32);
8282
#else
8383
nrf_timer_bit_width_set(NRF_TIMER1, NRF_TIMER_BIT_WIDTH_16);

0 commit comments

Comments
 (0)