I am using SDK15.2 to develop my project.
When I execute "app_timer_start" function (At line 115 of main.c), the system will crash.
Please reference the attach file for the attach file.
Would you please tell me how can i solve this problem?
In timers_start(), you are defining a variable err_code, which you later pass to the macro APP_ERROR_CHECK(), without initializing or assigning it any value. The variable will contain garbage data from RAM and the macro will put you in the error handler whenever the variable is non-zero. I suppose this is what you intended to do:
err_code = app_timer_start(Timer_10Ms_timer_id, APP_TIMER_TICKS(1000), (void *)0);
Thank you for your answer.
How can I modify my source-code, so the timer can create and execute successful?
I posted the suggested solution in my previous answer. You need to assign the return value from app_timer_start() to the variable err_code, before passing it to APP_ERROR_CHECK() macro. Are you experiencing any other issues after implementing this?
Thank you. It's my mistake.