The assert in the function below breaks the functionality when reliable is set to false (e.g. non SoftDevice code). It exists in (at least) SDK10 and SDK11. Remove the assert and the function works as expected.
uint32_t
nrf_drv_rtc_max_ticks_get(nrf_drv_rtc_t const * const p_instance) {
ASSERT(m_cb[p_instance->instance_id].reliable);
uint32_t ticks;
if (m_cb[p_instance->instance_id].reliable)
{
ticks = RTC_COUNTER_COUNTER_Msk - m_cb[p_instance->instance_id].tick_latency;
}
else
{
ticks = RTC_COUNTER_COUNTER_Msk;
}
return ticks;
}