Hello,
Version - nrf Connect SDK v2.7.0
The background to the system I am developing is described here
Multiprotocol Service Layer (MPSL) - BLE coexistence with proprietary communication stack
and here
Non-volatile storage with BLE and custom wireless stack using MPSL
In short, I have an application containing a BLE Peripheral, NVS and our custom 6TiSCH wireless stack. All three components are working simultaneously with access to hardware managed by the MPSL. Application works fine in our test environment, except for the occasional critical error that I want to discuss with you.
The first two are MPSL ASSERTS I have no clue how to interpret.:
(1) Assert from MPSL, stack pointer on idle thread, Link Register points to assert function, Program Counter in C:/ncs/v2.7.0/zephyr/lib/os/printk.c:209
ASSERTION FAIL [0] @ WEST_TOPDIR/nrf/subsys/mpsl/init/mpsl_init.c:301
MPSL ASSERT: 112, 2094
[18:15:50.145,141] <err> os: ***** HARD FAULT *****
[18:15:50.145,172] <err> os: Fault escalation (see below)
[18:15:50.145,172] <err> os: ARCH_EXCEPT with reason 4
.....
[14:24:44.787,170] <err> os: xpsr: 0x01000018
(2) Assert from MPSL, the stack pointer in the thread that manages the NVM storage of the firmware image, Link Register points to assert function, Program Counter in C:/ncs/v2.7.0/zephyr/lib/os/printk.c:209
ASSERTION FAIL [0] @ WEST_TOPDIR/nrf/subsys/mpsl/init/mpsl_init.c:301
MPSL ASSERT: 106, 684
[14:24:44.787,017] <err> os: ***** HARD FAULT *****
[14:24:44.787,048] <err> os: Fault escalation (see below)
[14:24:44.787,048] <err> os: ARCH_EXCEPT with reason 4
....
[14:24:44.787,170] <err> os: xpsr: 0x01000000
The third is connected with our software directly. It can be caught in the same place and under the same circumstances.
(3) This one has Ling Register set to our function iterating through a buffer within a Critical Section. This is not too excessive work for MCU.
[18:17:40.708,801] <err> os: ***** USAGE FAULT *****
[18:17:40.708,831] <err> os: Illegal use of the EPSR
...
[18:17:40.708,923] <err> os: xpsr: 0x60000200
Q1: How to interpret the number stated in MPSL assertions: MPSL ASSERT: 112, 2094 and MPSL ASSERT: 106, 684.
Q2: How long can I keep the MCU in the critical section with interrupts disabled?