I trying to debug an interaction between using SPIM3 on the nRF52840 and the BLE stack in the SoftDevice. A reset is happening, which I think is being generated by the SoftDevice, maybe due to an assertion or timeout failure. But how I do find out the cause? Ideally I'd like to catch the reset before it happens and get a stack trace into my code. I've searched DevZone for techniques and tried to set breakpoints on various handlers, and haven't found anything that works.
Is there a way to do this? I'm using nrfx only, not the SDK, with gcc, gdb, and the built-in PCA10056 J-Link.
The RESETREAS registers reports it as a RESETPIN reset, which seems odd. A colleague has suggested that maybe our code is trying to access the SD's reserved RAM region by accident. Is it protected via the MPU?