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

COMP stop task

Right now I'm stuck with the COMP driver. What I am trying to do is. Initialise COMP, start COMP with interrupt and STOP shortcut. Once I handled the interrupt I just want to start the COMP again with an interrupt and a shortcut. However, when trying to start the COMP I am getting an exeption because in the nrf_drv_comp.c this fails:

ASSERT(m_state == NRF_DRV_STATE_INITIALIZED);

when I call

nrf_drv_comp_start(NRF_DRV_COMP_EVT_EN_DOWN_MASK, NRF_DRV_COMP_SHORT_STOP_AFTER_DOWN_EVT);

My questions:

What is happening exactly when the stop task of the COMP is triggered due to interrupts?

In which state is the peripheral?

How can I use driver functions where m_state is checked when using interrupt shortcuts?

Parents Reply Children
No Data
Related