nRF52840 Zephyr BLE DFU - device continuously restarts after successful DFU

Hi everyone,

Environment setup:
- I am using Zephyr OS 2.5.0 running on nRF52840 board.
- MIRA mesh integrated in the application.

Problem description:
- Firmware A has BLE advertising enabled, MIRA enabled [CONFIG_MPSL_TIMESLOT_SESSION_COUNT set to 2 along with some other config related to MIRA].
- Firmware B has BLE advertising enabled, MIRA enabled [CONFIG_MPSL_TIMESLOT_SESSION_COUNT set to 2 along with some other config related to MIRA].
- Firmware C has BLE advertising enabled, MIRA disabled [CONFIG_MPSL_TIMESLOT_SESSION_COUNT undefined].
- nRF52840 board running on firmware A. Could be able to see BLE advertising.
- Device works as expected when I DFU firmware A --> firmware C. DFU performed successfully and also could be able to see BLE advertising.
- Device not working as expected when I DFU firmware A --> firmware B. DFU performed successfully but could not be able to see BLE advertising. Device restarts continuously.

My findings:
- I have noticed the major difference between firmware B and firmware C is CONFIG_MPSL_TIMESLOT_SESSION_COUNT.
- If CONFIG_MPSL_TIMESLOT_SESSION_COUNT undefined then, it will automatically disable the MIRA mesh even though CONFIG_MIRAMESH is defined.
     - The same case in firmware C, DFU from firmware A to C works in this case.
- if CONFIG_MPSL_TIMESLOT_SESSION_COUNT set to 1 & CONFIG_MIRAMESH defined then, it gives me compile error as MIRA mesh use additional slot of radio to do communication.
- If CONFIG_MPSL_TIMESLOT_SESSION_COUNT set to 2 & CONFIG_MIRAMESH defined then, no compilation error.
     - The same case in firmware B, DFU from firmware A to B performed successfully. Then after, device won't work as expected in this case. Device continuously restarts. Reset reason is 0x00000004 (reset due to software request).
     - This firmware B works as expected standalone. If I full erased the device and flash firmware B, then it works without any problem. This claims that there is no issue in firmware B.

Help:
What could be the root-cause where DFU performed successfully from firmware A to B but device continuously restarting?
Any help would be much appreciated.

Thanks & Regards,
Vivek K

Related