I have __asm("BKPT #0\n") in my code. When running without a debugger, it seems to generate a hard fault exception (which I can tell because I have a hard fault handler that writes to a flag in flash.)
At answers.launchpad.net/.../248410 it says: "For a Cortex-M0/M0+ processor when running without debugger control a "BKPT 0" instruction will cause a HardFault exception."
But the ARM docs seem to say that that the processor should enter DEBUG mode and the cpu halt. (Doesn't seem to say a hard fault exception is generated first.)
Can anyone confirm, for the NRF51? And how is the behaviour different on the NRF52?
Its just a curiousity. Once my app reaches a BKPT, all hope is lost so it doesn't really matter what happens. I won't leave a BKPT in the final code.