Merge pull request #11123 from desmond-blue/fix-nrf52-us-ticker-free

NRF52 need to call TIMER_TASK_SHUTDOWN for current consumption
pull/11104/head
Seppo Takalo 2019-08-06 11:33:55 +03:00 committed by GitHub
commit 6436f11335
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -141,6 +141,7 @@ void us_ticker_clear_interrupt(void)
void us_ticker_free(void)
{
nrf_timer_task_trigger(NRF_TIMER1, NRF_TIMER_TASK_STOP);
nrf_timer_task_trigger(NRF_TIMER1, NRF_TIMER_TASK_SHUTDOWN);
nrf_timer_int_disable(NRF_TIMER1, nrf_timer_compare_int_get(NRF_TIMER_CC_CHANNEL0));
NVIC_DisableIRQ(TIMER1_IRQn);
us_ticker_initialized = false;