This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hard Fault in SPM

Hi,

   I have an application demo using the latest nrf9160 sample lwm2m_client as its basis, and I'm getting a hard fault occasionally (after a few hours or days) in what I think is the SPM code.

    When the hard fault occurs, the SP and MSP are both at 0x20002668 and the PSP is at 0x20001C90.

    The Stack contents are 

0x20002668 : 0000CAB5 03D09000 0000CAB5 0001C200 00030100 00000000 0000F993 0000F997 0000F8D3 2000268C 2000268C 0000FDB0 00000000

which indicates to me, if I am reading it correctly, that the fault occurred with the PC at 0x0000F993

This doesn't appear to be in the application code space, and after looking into it further it seems to be in the SPM

Excerpt from the zephyr.map file for SPM:

.text.uarte_nrfx_poll_out
0x0000f964 0x2e spm/zephyr/drivers/serial/libspm_drivers__serial.a(uart_nrfx_uarte.c.obj)
.text.platform_calloc_uninit
0x0000f992 0x4 spm/zephyr/modules/nrfxlib/nrf_security/src/mbedtls/libspm_mbedcrypto_vanilla.a(platform.c.obj)
.text.platform_free_uninit
0x0000f996 0x2 spm/zephyr/modules/nrfxlib/nrf_security/src/mbedtls/libspm_mbedcrypto_vanilla.a(platform.c.obj)

Has anyone come across this before?

Am I looking in the correct place?

Any idea what might be causing this issue?

Thanks,

John

Related