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

app_timer with scheduler event context

After:

APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, true);

and:

app_timer_create(&m_sysctl_timer_id, APP_TIMER_MODE_REPEATED, sysctl_timer_event);
app_timer_start(m_sysctl_timer_id, ticks, NULL);

Will sysctl_timer_event() execute under control of app_sched_execute() at MAIN user context level?

Parents Reply
  • Hi Nikita,

    I have been using APP_TIMER_INIT with the USE_SCHEDULER flag set to false. I have not changed it to true:

    APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, true);
    

    And I now get an "Invalid Length" error on line 355 of app_timer.c: uint32_t err_code = m_evt_schedule_func(p_timer->p_timeout_handler, p_timer->p_context); APP_ERROR_CHECK(err_code);

    Do you know why this would occur?

Children
No Data
Related