Looking at the code in SDK 15.0.0 I think app timer library will be reinitialized. Is there a way by which I can check it the library is already initialized and initialize it only if required?
Looking at the code in SDK 15.0.0 I think app timer library will be reinitialized. Is there a way by which I can check it the library is already initialized and initialize it only if required?
Hi,
You are correct that the library will be reinitialized if you call app_timer_init() and it was previously initialized.
I am afraid you will have to keep track of initialization state in the application, as there is no tracking inside the library. However, usually you would initialize the module at startup, and re-initialize only in situations where re-initialization is what you want to do.
Regards,
Terje
I have multiple firmware applications, I have created multiple modules in my firmware application. These modules may or may not be included in the final build. I was planning to initialize the timer from the module but now I have to keep the initialization from main function. Or I have to keep track of timer module initialization myself.
Thanks for the reply!
Hi,
Yes, sadly that seems to be the way to go. I will register a feature request for API to check initialization state of the app timer module, and let time tell if it is deemed worthy of inclusion for a later release.
Regards,
Terje
Hi,
Yes, sadly that seems to be the way to go. I will register a feature request for API to check initialization state of the app timer module, and let time tell if it is deemed worthy of inclusion for a later release.
Regards,
Terje