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

Random BLE Disconnects + PWM

Recently our Device started exhibiting random BLE disconnect problems.

It's really hard to debug as not all of our devices are exhibiting this issue and in generally so far I've been unsuccessful in reproducing this bug.

The symptoms are as follows:

  • After the app gets connected to the device and for a while everything is normal
  • Afterwards there's a random interruption of connection (timing varies but it's definitely not some timeout related as this can take anywhere from sever minutes to hours to manifest)
  • The general approach ot this happening is we naturally start an autoconnect procedure this however fails
  • the connection gets dropped immediately. The App side logs seem to indicate that the diconnection comes from the HW side::
  • sometimes it will never manage to connect and time-out
  • sometimes it will diconnect while fetching services

The FW update after which this issue seems to have been introduced among other changed the PWM functionality, namely we switched from using softblink to HW PWM module using nrf_drv_pwm implementation

the PWM is instantiated using the static NRF_DRV_PWM_INSTANCE(0); it has recently caught my attention that this could be using TIMER0 which is reserved for sofdevice use, however I'm unable to get reliable info on whether this way of instantiating it will bind PWM instance to TIMER0

In the meantime I've switched to using NRF_DRV_PWM_INSTANCE(1); but as the issue isn't easy to reproduce I'm having trouble verifying if this is in fact the source of our problems

Parents Reply Children
  • The FW update after which this issue seems to have been introduced

     Without any logs it is difficult to figure out what the root cause is. If you have the firmware before and after the update, you might want to do a review and look more into what other changes the update did in your firmware, but if it was a very big update with a lot of changes, some nrf_logs that shows the failure might be needed to figure this one out.

Related