reason for requesting debug info is because I am running into file-system issue. And, it is always good to have debug capability
I am running into SPI stability issue when writing to the external Flash. In my app, after I create x (anywhere from 10 to 199) files, it gives me a USAGE FAULT… all the while the application ran through the same code numerous times. The Faulting instruction address points to:
0x000000002000cbd0 0x78 zephyr/drivers/spi/libdrivers__spi.a(spi_nrfx_spim.c.obj)
I know I am not out of memory based on this info after a reset:
[00:00:03.858,123] <inf> PWL: bsize = 16 ; frsize = 4096 ; blocks = 4096 ; bfree = 4075
Usage Fault error:
[02:37:54.849,243] <inf> PWL: MO Build path: /lfs/mo/mo0103
[02:37:58.065,032] <err> os: ***** USAGE FAULT *****
[02:37:58.070,678] <err> os: Stack overflow (context area not valid)
[02:37:58.077,972] <err> os: r0/a1: 0x20010cc0 r1/a2: 0x00000001 r2/a3: 0x00020b2a
[02:37:58.086,700] <err> os: r3/a4: 0x81003800 r12/ip: 0x0fc232c3 r14/lr: 0x00000001
[02:37:58.095,428] <err> os: xpsr: 0x00037000
[02:37:58.100,708] <err> os: s[ 0]: 0x00000000 s[ 1]: 0x00037c00 s[ 2]: 0x20010cc8 s[ 3]: 0x00020747
[02:37:58.111,206] <err> os: s[ 4]: 0x20010cc0 s[ 5]: 0x00000001 s[ 6]: 0x00000000 s[ 7]: 0x00000000
[02:37:58.121,704] <err> os: s[ 8]: 0x2000cbd0 s[ 9]: 0x00000000 s[10]: 0x00037088 s[11]: 0x2000e8a8
[02:37:58.132,202] <err> os: s[12]: 0x00037b14 s[13]: 0x00020b0f s[14]: 0x2000f174 s[15]: 0x00000000
[02:37:58.142,669] <err> os: fpscr: 0x00000001
[02:37:58.147,918] <err> os: Faulting instruction address (r15/pc): 0x2000cbd0
[02:37:58.155,883] <err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
[02:37:58.163,848] <err> os: Current thread: 0x2000d1f0 (unknown)
[02:37:58.170,654] <err> os: Halting system
After I reset the board, it hangs at fs_open when I am trying to create a new file.