We are facing an intermittent issue on an nRF52832–based product using bare-metal Nordic nRF5 SDK (non-NCS, non-Zephyr) BLE implementation.
Observed behavior:
BLE initializes correctly; advertising and connection establishment work as expected
Communication remains stable initially after power-up
After running for some time:
The BLE connection disconnects randomly, and
In some cases, the board appears to get stuck/hang (no BLE activity, no further application progress)
The issue is non-deterministic and does not correlate with boot or a specific user action
Software details:
SoC: nRF52832
SDK: Latest available nRF5 SDK (bare-metal)
SoftDevice: S132 (exact version can be shared if required)
OS: None (bare-metal)
Migration to NCS/Zephyr is not possible, as the project is in the final stage
Clock configuration verification:
32 MHz HF crystal: verified and stable (validated using standalone test code)
32.768 kHz LF crystal: verified and stable (validated using standalone test code)
No observed clock startup failures during normal operation
System specifics:
An external RTC is used for application timekeeping
Internal RTC peripherals are not used by the application
SoftDevice configuration has not been modified beyond required initialization
Additional observations:
In the “stuck” condition, the board does not reset automatically
No HardFault or watchdog reset is observed (watchdog currently disabled)
Power remains stable during the event
Request for guidance:
On nRF52832, are there known issues where:
External RTC usage can interfere with SoftDevice timing or scheduling?
Blocking sections, critical regions, or long interrupt latencies can cause both BLE disconnects and system hang?
Does the SoftDevice require uninterrupted access to internal RTC/LFCLK, regardless of application timekeeping source?
Are there specific SoftDevice asserts, events, or debug registers recommended to monitor for random disconnects or hangs?
Could this be caused by missed radio events, supervision timeout, or improper low-power handling over long runtimes?
Below is the log captured around the disconnection/hang event for reference:
nRF Connect, 2026-01-01
Sensor_Demo_d3 (EE:CE:3A:AC:83:D3)
V 11:28:27.412 Connecting to EE:CE:3A:AC:83:D3...
D 11:28:27.412 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 11:28:30.483 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 11:28:30.483 Connected to EE:CE:3A:AC:83:D3
D 11:28:30.483 wait(1600ms)
D 11:28:30.511 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 11:28:30.884 [Callback] Connection state changed with status: 19 and new state: DISCONNECTED (0)
W 11:28:30.884 Connection terminated by peer (status 19)
I 11:28:30.884 Disconnected
D 11:28:30.911 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
V 11:29:19.478 Removing bond information...
D 11:29:19.478 device.removeBond() (hidden)
D 11:29:19.584 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: NONE (10), reason: REMOVED (9)
I 11:29:19.584 Bond information lost, reason: REMOVED (9)
D 11:29:25.048 gatt.close()
D 11:29:25.049 wait(200)
V 11:29:25.258 Connecting to EE:CE:3A:AC:83:D3...
D 11:29:25.259 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 11:29:55.369 [Callback] Connection state changed with status: 147 and new state: DISCONNECTED (0)
E 11:29:55.370 Error 147 (0x93): GATT CONN TIMEOUT
I 11:29:55.370 Disconnected
D 11:30:03.355 gatt.close()
D 11:30:03.357 wait(200)
V 11:30:03.559 Connecting to EE:CE:3A:AC:83:D3...
D 11:30:03.559 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 11:30:04.118 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 11:30:04.118 Connected to EE:CE:3A:AC:83:D3
V 11:30:04.119 Discovering services...
D 11:30:04.119 gatt.discoverServices()
D 11:30:04.147 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
D 11:30:04.216 [Broadcast] Action received: android.bluetooth.device.extra.PAIRING_VARIANT, pairing variant: CONSENT
D 11:30:04.218 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BONDING (11)
I 11:30:04.709 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 11:30:04.818 [Callback] Services discovered with status: 0
I 11:30:04.818 Services discovered
V 11:30:04.830 Generic Access (0x1800)
- Device Name [R W] (0x2A00)
- Appearance [R] (0x2A01)
- Peripheral Preferred Connection Parameters [R] (0x2A04)
- Central Address Resolution [R] (0x2AA6)
Generic Attribute (0x1801)
Unknown Service (00001000-1112-1314-1516-171819202122)
- Unknown Characteristic [N R W WNR] (00001003-1112-1314-1516-171819202122)
Client Characteristic Configuration (0x2902)
Battery Service (0x180F)
- Battery Level [N R W WNR] (0x2A19)
Client Characteristic Configuration (0x2902)
Device Information (0x180A)
- Manufacturer Name String [R] (0x2A29)
- Model Number String [R] (0x2A24)
- Serial Number String [R] (0x2A25)
- Hardware Revision String [R] (0x2A27)
- Firmware Revision String [R] (0x2A26)
D 11:30:04.830 gatt.setCharacteristicNotification(00001003-1112-1314-1516-171819202122, true)
D 11:30:04.832 gatt.setCharacteristicNotification(00002a19-0000-1000-8000-00805f9b34fb, true)
I 11:30:04.895 Connection parameters updated (interval: 48.75ms, latency: 0, timeout: 5000ms)
D 11:30:09.363 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: NONE (10), reason: REMOVED (9)
I 11:30:09.363 Bonding failed, reason: REMOVED (9)
I 11:30:10.035 Connection parameters updated (interval: 47.5ms, latency: 0, timeout: 4000ms)
V 11:30:10.166 Disconnecting...
D 11:30:10.166 gatt.disconnect()
D 11:30:10.182 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
I 11:30:10.182 Disconnected
D 11:30:11.315 [Broadcast] Action received: android.bluetooth.device.action.ACL_DISCONNECTED
D 11:30:11.505 gatt.close()
D 11:30:11.506 wait(200)
V 11:30:11.708 Connecting to EE:CE:3A:AC:83:D3...
D 11:30:11.708 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 11:30:41.789 [Callback] Connection state changed with status: 147 and new state: DISCONNECTED (0)
E 11:30:41.789 Error 147 (0x93): GATT CONN TIMEOUT
I 11:30:41.789 Disconnected
D 11:30:54.877 gatt.close()
D 11:30:54.878 wait(200)
V 11:30:55.080 Connecting to EE:CE:3A:AC:83:D3...
D 11:30:55.080 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 11:30:55.655 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 11:30:55.655 Connected to EE:CE:3A:AC:83:D3
V 11:30:55.656 Discovering services...
D 11:30:55.656 gatt.discoverServices()