This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

can I change the priority of RTC2 when used along with softdevice?

Hi,

we are using RTC2 with APP_IRQ_PRIORITY_LOWEST. But the code hanged inside the interrupt handler. when we did step through debug, we came to know that in nrf_drv_common.c file, there is a following condition which blocked RTC.

#ifdef SOFTDEVICE_PRESENT
    ASSERT((priority == APP_IRQ_PRIORITY_LOW) || (priority == APP_IRQ_PRIORITY_HIGH));
#endif

Therefore, we made changes to the above as,

#ifdef SOFTDEVICE_PRESENT
    ASSERT((priority == APP_IRQ_PRIORITY_LOWEST) || (priority == APP_IRQ_PRIORITY_LOW) || (priority == APP_IRQ_PRIORITY_HIGH));
#endif

After making this change, there was no issue and RTC2 seemed to work fine.

My concern is that, will this change create any issue in future? why only LOW and HIGH priority was asserted when softdevice is present?

Note: we can give only LOWEST priority to RTC as we are calling SPI(which has LOW priority) inside RTC handler.

Parents Reply Children
Related