After searching around a little bit I found this post, but sadly an answer did never come up apparently.
I'm using the nrf52 DK, using the 132 Softdevice.
I'm kind of at a loss here and I know it's hard to answer to something like this.
I'm programming an MCU that does communicate with two other devices via I²C and on a timer writes data to the internal flash. An external app can connect, request data and send data to the MCU.
Everything went well for quite some time until last week where the MCU suddenly started to lose connection. The application still works (using sd_write.. sd_delete softdevice API calls to access the flash) after BLE shuts off. LEDs are still blinking when they should blink, but the MCU completely stops advertising, can't be found by any device and will not start again.
To get BLE working again the MCU needs to restart. This happens on the Dev board as on the MCU that I'm working with.
Any pointer to what I could do is appreciated, like how to reset the BLE, reset the Softdevice or anything that worked for you.
The big problem is that it can't be reproduced reliably, sometimes the MCU will withstand minutes of stress testing without any issue, sometimes the BLE shuts off seconds after the first connection while the MCU does essentially nothing. As this issue came up very far in the development stage it's very hard to find the problem causer. The program stretches upon a multitude of files and thousands of lines of code. Right now I'm willing to accept basically any form of a solution. Getting back BLE would be very nice, especially as it is the only way to communicate with the device, debugging works very poorly while BLE is running.
I tried to start advertising on a timer, which did nothing. Waiting for quite some time for the MCU to recover on its own. Using a lot of different devices to connect (iPhone, iPad, multiple Android phones) and while testing (the problem occurs very rarely) reading through the code to find the issue (with not prevail so far).