I implemented a timer counter module to generate periodic interrupts an initiate some actions in my application. I want this to run all the time if I'm disconnected or connected. The timer initializes and runs as expected prior to a connect from an Android tablet. However, when I disconnect from the tablet the timer stops. I have tried inserting a timer enable function in the BLE event handler for a disconnect to keep the timer active. This worked, but I'm not sure it's the proper thing to do. I didn't find what's causing the timer to stop in the timer module code.
Let me know what you suggest as the best way to keep the timer running and generating interrupts.
If it is running normally before a BLE connection, then it is weird that it ceases operation after a BLE connection.
Putting the timer enable function in the BLE event handler upon disconnect should be fine, but I recommend determining the cause of the timer stopping. (We can't review your project fully unless you post it to the forums for us to review)