NRF5x: Increase lp us ticker interrupt priority

Set the second highest user level, leaving the highest for UART (we are having constant overflows) and two levels below for everything else.
This should increase the timer accuracy.
pull/7172/head
Przemyslaw Stekiel 2018-05-25 13:21:48 +02:00
parent 7e222f2994
commit b073720d62
2 changed files with 2 additions and 15 deletions

View File

@ -173,13 +173,7 @@ void common_rtc_init(void)
nrf_rtc_int_disable(COMMON_RTC_INSTANCE, LP_TICKER_INT_MASK);
#endif
nrf_drv_common_irq_enable(nrf_drv_get_IRQn(COMMON_RTC_INSTANCE),
#ifdef NRF51
APP_IRQ_PRIORITY_LOW
#elif defined(NRF52) || defined(NRF52840_XXAA)
APP_IRQ_PRIORITY_LOWEST
#endif
);
nrf_drv_common_irq_enable(nrf_drv_get_IRQn(COMMON_RTC_INSTANCE), APP_IRQ_PRIORITY_HIGH);
nrf_rtc_task_trigger(COMMON_RTC_INSTANCE, NRF_RTC_TASK_START);

View File

@ -89,14 +89,7 @@ void us_ticker_init(void)
NVIC_SetVector(TIMER1_IRQn, (uint32_t)us_ticker_irq_handler);
nrf_drv_common_irq_enable(TIMER1_IRQn,
#ifdef NRF51
APP_IRQ_PRIORITY_LOW
#elif defined(NRF52) || defined(NRF52840_XXAA)
APP_IRQ_PRIORITY_LOWEST
#endif
);
nrf_drv_common_irq_enable(TIMER1_IRQn, APP_IRQ_PRIORITY_HIGH);
nrf_timer_task_trigger(NRF_TIMER1, NRF_TIMER_TASK_START);