Hi,
I want to connect X-NUCLEO-NFC08A1 with ST25R3916B to nRF5340 board by adding a SPI node to device-tree source. After compiling and flashing the board, triggering interrupt causes an assertion.
For tests, I trigger interrupt manually with a wire. I couldn't find the root cause.
Device-tree file nrf5340dk_nrf5340_cpuapp.overlay:
&spi1 { compatible = "nordic,nrf-spim"; status = "okay"; cs-gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; pinctrl-0 = <&spi0_default_alt>; pinctrl-1 = <&spi0_sleep_alt>; pinctrl-names = "default", "sleep"; st25r3916b@0 { compatible = "st,st25r3916b"; reg = <0>; spi-max-frequency = <4000000>; irq-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; //led-nfca-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; }; }; &arduino_spi { status = "disabled"; }; &arduino_i2c { status = "disabled"; }; &arduino_serial { status = "disabled"; }; &arduino_header{ status = "disabled"; }; &arduino_adc{ status = "disabled"; }; &pinctrl { spi0_default_alt: spi0_default_alt { group1 { psels = <NRF_PSEL(SPIM_SCK, 1, 15)>, <NRF_PSEL(SPIM_MOSI, 1, 13)>, <NRF_PSEL(SPIM_MISO, 1, 14)>; }; }; spi0_sleep_alt: spi0_sleep_alt { group1 { psels = <NRF_PSEL(SPIM_SCK, 1, 15)>, <NRF_PSEL(SPIM_MOSI, 1, 13)>, <NRF_PSEL(SPIM_MISO, 1, 14)>; low-power-enable; }; }; };
Logs:
ASSERTION FAIL @ WEST_TOPDIR/zephyr/kernel/sem.c:136 E: r0/a1: 0x00000004 r1/a2: 0x00000088 r2/a3: 0x00000000 E: r3/a4: 0x00010ed1 r12/ip: 0x80000000 r14/lr: 0x000168ef E: xpsr: 0x6100003f E: Faulting instruction address (r15/pc): 0x00018f5c E: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0 E: Fault during interrupt handling
Converting address to source code line number...
C:\arm-none-eabi-addr2line.exe build\zephyr\zephyr.elf 0x00018f5c
..gives C:/ncs/v2.6.0/zephyr/lib/os/assert.c:44
And the r14/lr: 0x000168ef gives:
C:\arm-none-eabi-addr2line.exe build\zephyr\zephyr.elf 0x000168ef
C:/ncs/v2.6.0/zephyr/include/zephyr/spinlock.h:136