ZEPHYR FATAL ERROR in sys_clock_announce() with Connect SDK 3.0.2

Hello,

once in a while we are experiencing ZEPHYR FATAL ERROR. It's very hard to reproduce on purpose and investigate in detail. But it looks like t->fn() somehow becomes NULL and gets executed in sys_clock_annouce(). Or a function that is called via t->fn() executes NULL pointer.

<err> os: ***** USAGE FAULT *****
<err> os:   Illegal use of the EPSR
<err> os: r0/a1:  0x20008c58  r1/a2:  0x00000000  r2/a3:  0x20001ad4
<err> os: r3/a4:  0x00000000 r12/ip:  0x00000000 r14/lr:  0x00080af9
<err> os:  xpsr:  0x600000f4
<err> os: s[ 0]:  0x00000000  s[ 1]:  0x20001a2c  s[ 2]:  0x00000001  s[ 3]:  0x00074321
<err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00077c8d
<err> os: s[ 8]:  0x00000000  s[ 9]:  0x00091859  s[10]:  0x00095fe8  s[11]:  0x00000040
<err> os: s[12]:  0x0007d3bd  s[13]:  0x2001482c  s[14]:  0x00000000  s[15]:  0x00000000
<err> os: fpscr:  0x00000008
<err> os: Faulting instruction address (r15/pc): 0x00000000
<err> os: >>> ZEPHYR FATAL ERROR 35: Unknown error on CPU 0
<err> os: Fault during interrupt handling
<err> os: Current thread: 0x20013528 (unknown)
<err> os: Halting system

Current thread is IDLE, LR points to sys_clock_announce().

We are using one timer in the code and it's callback function sends event via APP_EVENT_SUBMIT() only. So it should not fail like this. Also we are using delayable works, but as I understand, these callbacks are executed from thread, not directly from timer interrupt function.

Are there any ideas where we should look for a solution to this?

BT is activated when error happens. Can it be related?

Thanks.

Related