system halts due to spurious interrupts on uart #uart #usb


I am using nrf52840dk_nrf52840 for my project. In my current task I have enabled CDC_ACM to receive device certificated via USB and store it to internal flash using settings. During storage, when the mutex is locked, the system halts with the below error message.
[00:01:01.772,705] <err> os: ***** USAGE FAULT *****
[00:01:01.772,705] <err> os: Illegal use of the EPSR
[00:01:01.772,735] <err> os: r0/a1: 0x20000ab4 r1/a2: 0x00001463 r2/a3: 0x200014c8
[00:01:01.772,735] <err> os: r3/a4: 0x00000000 r12/ip: 0x20003e58 r14/lr: 0xffffffff
[00:01:01.772,735] <err> os: xpsr: 0x20000000
[00:01:01.772,735] <err> os: Faulting instruction address (r15/pc): 0x00000000
[00:01:01.772,735] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
[00:01:01.772,766] <err> os: Current thread: 0x20001570 (shell_uart)
[00:01:02.817,138] <err> os: Halting system

It seems that there are some interrupts in the UART channel that is causing the system halt.
Device binding in the project is as defined below.

In nrf52840dk_nrf52840.dts file, USB device, console, shell are defined.
chosen {
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,uart-mcumgr = &uart0;
zephyr,bt-mon-uart = &uart0;
zephyr,bt-c2h-uart = &uart0;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,code-partition = &slot0_partition;

zephyr_udc0: &usbd {
compatible = "nordic,nrf-usbd";
status = "okay";


In app.overlay file, cdc acm binding is defined.
&zephyr_udc0 {
cdc_acm_uart0:cdc_acm_uart0 {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";

Could you please let me know if the configuration is correct? And some hints what could cause this halt?