Can anybody say which is better way for timer interrupt.
app_timers or directly addressing the register.
Regards Balaji
Can anybody say which is better way for timer interrupt.
app_timers or directly addressing the register.
Regards Balaji
Which is better is hard to give a general answer to, as it is very dependent on your application.
If you use the softdevice, it will at least most often be much easier to use app_timer, since some of the SDK modules depend on it (app_button, ble_conn_params). It is possible to modify those modules to not depend on it, or implement your own timer module that exposes an equal API, but it won't necessarily be simple. I would therefore normally recommend using app_timer, but if there are special circumstances, it might be worth it to do the effort of rolling your own.
Which is better is hard to give a general answer to, as it is very dependent on your application.
If you use the softdevice, it will at least most often be much easier to use app_timer, since some of the SDK modules depend on it (app_button, ble_conn_params). It is possible to modify those modules to not depend on it, or implement your own timer module that exposes an equal API, but it won't necessarily be simple. I would therefore normally recommend using app_timer, but if there are special circumstances, it might be worth it to do the effort of rolling your own.