My project: nRF51422, S110, based on SDK 7.1.
My project employs several application timers (run via the scheduler) and a continuously running Timer1-based 1ms timestamp counter. Timer1 increments a static counter variable on each CC0 interrupt. An application (scheduled) timer runs a battery check every 5 seconds (for BAS service). The system appears to run fine while advertising as long as a potential client (not connected) is NOT activated in the vicinity. As soon as a potential client (again, not connected) is switched on (iPhone /iOS8.1, running "LightBlue" app) Timer1 looses over 1 second between the 5 second battery check intervals. In the Segger RTT captures below each battery reading is preceded by the (Timer1 based) 1ms timestamp, followed by the time since the last reading. The "LightBlue" app is activated at timestamp [66017].
If the client connects, the timer once again becomes accurate.
Upon disconnection, the timer once again looses time.
I have Timer1 set for HIGH interrupt priority. Is this expected? Any idea why this is happening?
Update: Altering the timer to interrupt at 10ms, instead of 1ms, intervals appears to remedy the issue. Apparently the processor can't keep up with all the interrupts while the soft device is working on advertising.