nrfx_timer_extended_compare fails assertion when timer is paused

Mirroring the issue from Github here

I'm working on an application with timers and PPI.
Today I discovered that when using the function nrfx_timer_extended_compare with a timer enabled but paused I get a runtime assertion error.
This assertion fails, as the timer state is NRFX_DRV_STATE_POWERED_ON and not NRFX_DRV_STATE_INITIALIZED

NRFX_ASSERT(m_cb[p_instance->instance_id].state == NRFX_DRV_STATE_INITIALIZED);

A few lines above the function nrfx_timer_compare uses a different assertion, just validating that the state is not NRFX_DRV_STATE_UNINITIALIZED

NRFX_ASSERT(m_cb[p_instance->instance_id].state != NRFX_DRV_STATE_UNINITIALIZED);

Is this a desired behaviour or a bug? Seems strange to me that one cannot update the compare value of the timer when the timer is paused.

Related