Question: can BLE events pre-empt timer events (such as timers patting the watchdog) for a long period of time?

I have a question: do BLE events (such as connect/disconnect/read GATT/write GATT/notify GATT) pre-empt timer events (started by app_timer2.c) such that the app timer events can sometimes not fire for a long period of time?  Can this be the reason why a watchdog set for a period of 1 second, for example, not fire, because the BLE events are dominating the CPU cycles and not allowing the timer events to fire?  If this is the case, what is the recommended strategy for patting a hardware watchdog in the scenario of high BLE traffic?

  • Hello,

    The softdevice controller can typically block the application for up to hundreds of us during connection event, and this might happens several times during a connection event, however there should still be lot of time for the application to run it's code yes. There is no way I can see how the softdevice can block an application interrupt for up to 1 second.

    My only suggestion would be to ensure you feed the watchdog sufficiently often so you don't get near the watchdog timeout. So if the watchdog timeout is 1second, I suggest you feed it every 500ms.

    Kenneth

Related