Issue regarding app timer

I am using nrfsdk17.1.0 I had used 3 timers in my application. one timer starts in main function, second timer starts in the timer handler of first timer. My second timer is not started it is giving an error as soon as program reach there fatal error and system reset gets printed on com port I can't be able to figure out the problem please help me

Thanks in advance

Parents Reply Children
  • yes that is done

     

    
    APP_TIMER_DEF(motion_sensor_timer_id);
     err_code = app_timer_create(&motion_sensor_timer_id,
                                    APP_TIMER_MODE_REPEATED,
                                    motion_sensor_timer_handler);
          APP_ERROR_CHECK(err_code);

  • Hello,

    Thank you for elaborating.
    Could you also show me your sdk_config.h file and preprocessor defines?
    I would like to check the app timer version being used, as well as the configuration of related libraries. Could you also show more of the code being executed around the call to start the second timer?
    Which event handler is starting the second timer, and what else happens in this event handler, for instance?

    You could also define APP_TIMER_CONFIG_LOG_ENABLED 1 in your sdk_config, and set the log level to APP_TIMER_CONFIG_LOG_LEVEL 4, so that the logging is more verbose and we could see more of what is happening within the app timer.

    Best regards,
    Karl

Related