Hi devzone-team,
my application (custom board with nrf52840, sdk 16.0.098) uses 12 timers and it's organize in the 3 parts: uart, a pwm-bus (proprietary) and ble-scan-advertising (no connections).
The application is based on the beacon-example and is expanded with uart-, scheduler, and io-functionality.
If only one of the program-component works, all is fine. If there are 2 or all 3 components works at the same time, after a few minutes the timer-module crashes. The most times the debugger show an error on line 299 in app_timer2
sdk_config.h, the app_timer area
I test many things
* start only timers in scheduler (or normal functions), never in interrupt handlers
* makes timer in scheduler (what makes the error come faster)
* makes timer in interrupt
* works with global variables, works with scheduler-copy memory
But the final result is, thats the timer crashes the most times in minutes (sometimes after 1h or more).
My guess is that two or more timers overlap and the app_timer2 is pointing on a wrong timer and makes the assert.
Questions:
1) Can timer restarted in timer-handler (single shot timer)?
2) Can timer works with global variables (in interrupt and/or scheduler mode)?
3) I only make changes on sdk_config in APP_TIMER_CONFIG_OP_QUEUE_SIZE=32 but there is no possibility to change the MAX_TIMER value, perhaps the application cant work with 12 timer or more?
4) Is there a MAX-TIMER-counter, which have to be larger?
best regards
Bjoern