ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0

Hi,

DK:NRF54L15 

Modify form the sample code:peripheral_uart

I add one spi21 and k_timer to  get the sensor data, periodically. But got the error  ZEPHYR FATAL ERROR 4 Kernel panic as below

When I  placed the who_bme_read_sample in main function, it could work normally.

This error always happened when used the k_timer the trigger the spi interface.

Below is error code:


00> [00:04:30.693,542] <err> os: r0/a1: 0x00000004 r1/a2: 0x00000088 r2/a3: 0x20000c80[0m
00> [00:04:30.693,552] <err> os: r3/a4: 0x00000004 r12/ip: 0x200076d4 r14/lr: 0x00029cab
00> [00:04:30.693,559] <err> os: xpsr: 0x210000f4
00> [00:04:30.693,566] <err> os: Faulting instruction address (r15/pc): 0x0002fa36
00> [00:04:30.693,590] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
00> [00:04:30.693,597] <err> os: Fault during interrupt handling
00>
00> [00:04:30.693,619] <err> os: Current thread: 0x20003910 (idle)

#timer callback

#who_bme_read_sample function  to read the sensor ID

#SPI setting:According to the Lesson 5 – Serial Peripheral Interface (SPI), add spi21
https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-5-serial-peripheral-interface-spi/

Many thanks.

Related