Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Nucleo #7

Open
mfikes opened this issue May 4, 2023 · 4 comments
Open

Crash on Nucleo #7

mfikes opened this issue May 4, 2023 · 4 comments
Assignees

Comments

@mfikes
Copy link
Contributor

mfikes commented May 4, 2023

When running on the Nucleo and scanning an NFC card, I get a crash after the scan:

NFCA Passive ISO-DEP device found. UID: 04865372B67280
 Select NDEF Application: OK Data: 6A82
[00:00:00.150,000] <err> os: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
--- 5 messages dropped ---
[00:00:00.150,000] <err> os: Current thread: 0x200001d8 (unknown)
[00:00:00.168,000] <err> fatal_error: Resetting system*** Booting Zephyr OS build v3.1.99-ncs1  ***

If a small delay is put in the main loop, say via k_sleep(K_MSEC(1)), then the crash goes away.

This crash doesn't occur when targeting the Nordic dev boards.

@mfikes mfikes self-assigned this May 4, 2023
@mfikes
Copy link
Contributor Author

mfikes commented May 4, 2023

Trying to catch it in the debugger yields:

(gdb) bt
#0  arch_system_halt (reason=reason@entry=0) at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/kernel/fatal.c:32
#1  0x08006be6 in k_sys_fatal_error_handler (reason=0, reason@entry=8, esf=esf@entry=0x20001a88 <z_interrupt_stacks+448>)
    at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/kernel/fatal.c:46
#2  0x08006cb0 in z_fatal_error (reason=8, reason@entry=536877696, esf=esf@entry=0x20001a88 <z_interrupt_stacks+448>) at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/kernel/fatal.c:131
#3  0x08001e8c in z_arm_fatal_error (reason=536877696, reason@entry=0, esf=0x20001a88 <z_interrupt_stacks+448>, esf@entry=0x20001aa0 <z_interrupt_stacks+472>)
    at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/arch/arm/core/aarch32/fatal.c:63
#4  0x0800214e in z_arm_fault (msp=<optimized out>, psp=<optimized out>, exc_return=<optimized out>, callee_regs=<optimized out>)
    at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:1070
#5  0x080021e0 in z_arm_hard_fault () at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/arch/arm/core/aarch32/cortex_m/fault_s.S:102
#6  <signal handler called>
#7  0x00003100 in ?? ()
#8  0x08008522 in z_cbprintf_cpy (buf=<optimized out>, len=0, ctx=0x0) at /Users/mfikes/Projects/vouch-zephyr-nfc08a1/zephyr/include/zephyr/sys/cbprintf.h:484
#9  0x0800036e in __udivmoddi4 ()
#10 0x20000120 in log_process_thread_sem ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

@RANAROYG
Copy link

RANAROYG commented Sep 27, 2023

I am new to the NFC and I am trying to build and flash this example in the custom board with nRF52840 and the ST25R3916 chip. I have checked the overlay file and also added few required macros for JLinkRTTViewer in the prj.conf file. I also tried by disabling the 'platformSpiSelect()' and 'platformSpiDeselect()' and enabling the ST25R_COM_SINGLETXRX macro as mentioned in the guide. But, the code throws the error of st25r chip not initialized. Kind request to guide me for the required changes in the code to function as intended.

@mfikes
Copy link
Contributor Author

mfikes commented Sep 27, 2023

@RANAROYG Are you seeing the crash reported in this ticket? Or is this a separate question?

@RANAROYG
Copy link

I apologise for the above query. I request to resolve the query. I need to create the new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants