|
一直在触发(好像几毫秒就触发一次),我定义的是1秒触发一次。
#define NRF_DRV_TIMER_DEFAULT_CONFIG(id) \
{ \
.frequency = (nrf_timer_frequency_t)NRF_TIMER_FREQ_16MHz, \
.mode = (nrf_timer_mode_t)NRF_TIMER_MODE_TIMER, \
.bit_width = (nrf_timer_bit_width_t)NRF_TIMER_BIT_WIDTH_32, \
.interrupt_priority = APP_IRQ_PRIORITY_LOW, \
.p_context = NULL \
}
如上的配置是我自己配置的。教程上的配置如下但是我没找到出处,我定义的是定时器1
.frequency =(nrf_timer_frequency_t)NRFX_TIMER_DEFAULT_CONFIG_FREQUENCY,\
.mode =(nrf_timer_mode_t)NRFX_TIMER_DEFAULT_CONFIG_MODE, \
.bit_width =(nrf_timer_bit_width_t)NRFX_TIMER_DEFAULT_CONFIG_BIT_WIDTH,\
.interrupt_priority=NRFX_TIMER_DEFAULT_CONFIG_IRQ_PRIORITY, \
.p_context= NULL \ |
|