This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Watchdog reset after exactly 8000s while advertising with whitelist after previous successful connection

Hi

On my device, after a successful (bonded) connection to a central, if I then turn off BLE on that central, my device moves through fast advertising and slow advertising (with whitelist) as expected. I can reconnect at will, however if I leave EXACTLY 8000 seconds (about 2 hrs, 13 mins) WITHOUT turning BLE back on on said central, then the NRF52832 WD resets.

At the moment I am detecting and handling this situation over the wire (SPI), but it would be rather better if it did not occur. The 8000 seconds is FULLY deterministic, and its too round a number to be some fluke, it must be deterministically driven by something!

SDK is 15.2, Soft Device is S132 (s132_nrf52_6.1.0_softdevice.hex)

Wondered if someone had an idea why this might be happening?

I have read about whitelisting and identify keys and a bug that exists in the Nordic SDK around the use of these? Maybe someone can tell me how I can turn off the use of Identity Keys, while retaining whitelisting?

Kind Regards

Karen

Parents
  • The 8000 seconds is FULLY deterministic

    Always nice to have a well-defined repeatable symptom.

    Have you tried putting some traces in to see what's happening - or what stops happening - at this point ?

  • Hi. Still learning about what's going on here.  If the WD reset code is removed, then it will run past the 8000 seconds, and the device remains connectable after the 8000 seconds. Additionally, if the power management code is removed from main () then the main loop will kick the WDT regularly as it wont sleep. Issue would appear to be that after 8000s, the SD quits kicking the WDT, and the WD then resets the device. 

  • Hi Karen,

     

    veletron said:
    Hi. Still learning about what's going on here.  If the WD reset code is removed, then it will run past the 8000 seconds, and the device remains connectable after the 8000 seconds. Additionally, if the power management code is removed from main () then the main loop will kick the WDT regularly as it wont sleep. Issue would appear to be that after 8000s, the SD quits kicking the WDT, and the WD then resets the device. 

    If your application always sleeps, the watchdog will not be reloaded.

    This is normally not a problem if you have the watchdog configured to pause in sleep-mode.

    However: the softdevice actually wakes up to handle the radio for advertising etc, without waking up the application since there's no new events for the application. Over time, this amounts to several seconds of active CPU time, and the watchdog eventually expires.

     

    If you have a dummy-event in your application that wakes it up every X seconds/minutes (like a app_timer instance), which runs your loop and reloads the watchdog; you should be able to work around this issue.

     

    Kind regards,

    Håkon

  • Hi. Thanks. that is a reasonable way forward to prove that this is, indeed the issue here. We don't particularly want to mask out other issues by kicking the WD off a timer, but we could kick hourly I guess.

    Karen

Reply Children
Related