CPU stuck after starting debugger

Hello.

I'm using ncs2.4.0 and compiling my code for a custom board based on the nrf9160dk_ns and most of the times I start the debugger, the code starts at 

DEFAULT_IRQ_HANDLER(SPU_IRQHandler) and it stays there.
How can I fix this?
Thank you
Related