Dynamic change of connection interval causes peripheral crash

Hi everyone, I am trying to change the connection interval dynamically from 1000 ms to 100 ms between two nRF52840 devices (central and peripheral) running NCS v2.1.0 through bt_conn_le_param_update, however the peripheral firmware crashes while the central device shows 0x08 disconnection and carries on.

When looking at the RTT logs without a debugger attached the log just halts and I can't seem to pick up on a fatal error. When attaching a debugger, the following error occurs but it is hard to understand whether it is actually the same error source or just the consequence of me pausing the program execution while trying to step through:

[00:01:09.224,060] <err> mpsl_init: MPSL ASSERT: 112, 2142
[00:01:09.224,090] <err> os: ***** HARD FAULT *****
[00:01:09.224,090] <err> os:   Fault escalation (see below)
[00:01:09.224,121] <err> os: ARCH_EXCEPT with reason 3

[00:01:09.224,121] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000003  r2/a3:  0x00000002
[00:01:09.224,151] <err> os: r3/a4:  0x20003908 r12/ip:  0x00000000 r14/lr:  0x00015dd1
[00:01:09.224,151] <err> os:  xpsr:  0x41000018
[00:01:09.224,182] <err> os: Faulting instruction address (r15/pc): 0x0002a85c
[00:01:09.224,182] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:01:09.224,212] <err> os: Fault during interrupt handling

[00:01:09.224,243] <err> os: Current thread: 0x20001818 (tid)
[00:01:09.563,110] <err> os: Halting system

I can use the same functions successfully to request an update to the connection interval (from 1000 ms to 100 ms) from the peripheral when it is connected to a phone, so this issue only appears with a connection between two devices running NCS.

I have noticed that this only occurs when the delta between the initial and target connection intervals is larger than 100-200ms:

  • 1500 -> 100: crash
  • 1000 -> 100: crash
  • 500 -> 100: crash
  • 400 -> 100: crash
  • 300 -> 100: sometimes crash, sometimes ok
  • 200 -> 100: ok
  • 400 -> 200: ok
Parents Reply Children
Related