Can program flash and verify the flash but does not run


We have develop a custom board with the nRF52832-QFAA.

We have used the nRF52 DK as reference for our design and also as a programmer / debugger.

But the issue is that we cannot debug nor program/run a program in our custom board.

If the try to debug the a verý simple blink LED program, it just hangs in a system file.

The program hangs a the line "msr BASEPRI, r0".

What could be the issue ?

/* r1: zero, for setting BASEPRI (needs a register) */
eors.n r1, r1

/* unlock BASEPRI so wfe gets interrupted by incoming interrupts */
msr BASEPRI, r1

_sleep_if_allowed wfe

msr BASEPRI, r0
cpsie i
#error Unknown ARM architecture