I am using FreeRTOS (sdk 15.2) configured to use RTC for the tick source and systick timer for the system. I am trying to put the device in a low power mode. I have tried two approaches:
1) One task running at priority higher than the idle task that makes calls to nrf_pwr_mgmt_feed() and nrf_pwr_mgmt_run().
2) Using the idle hook with tickless idle. The hook calls nrf_pwr_mgmt_feed()
In both setups, the device returns from WFE() immediately with NVIC->ISPR[0] set to IRQn 17 which is the RTC IRQn. I am also trying to analyze the CPU usage using nrf_pwr_mgmt which is 100% in both situations. Am I misconfiguring RTC or FreeRTOS somehow?