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

Timer setting problem

I have created file timer_init.h / c. I make the timer settings in this file and include it in main.c.
I create the timers in the timers_init () function. However, the 2 timers I show below do not stop when I call app_timer_stop ().
But if I define these timers in main.c, it works fine. What could be the problem?

Parents Reply
  • Hi,

    1-)When using app_timer_stop () I was not returning err_code. After you told me, I edited my code like this:

    err_code = app_timer_stop(m_open_door_hash_value_timer_id); /* Stop open door hash value timer. */
    APP_ERROR_CHECK(err_code);

    err_code = app_timer_stop(m_open_door_timer_id); /* Stop open door timer. */
    APP_ERROR_CHECK(err_code);

    After doing so, the program started going to NRF_BREAKPOINT_COND. But I don't know how to read the error code.

    2-)During compilation I get a warning like this. I guess it has nothing to do with this problem.

    3-) I don't think there is a problem in this part.

Children
Related