nrf52832 unable to connect to the target with openocd and black magic probe

Hi all,

I have a nrf52832 board from holyiot ( I was able to program it with st-link v2 mini and the black magic probe. All worked without any problems until I uploaded a very simple project with just a main function with __WFE call:

main (int argc, char* argv[])
while (1)

After I uploaded this project I'm not able to connect to the target anymore. I did it with two boards and the result is the same. This is the output from the openocd:

GNU MCU Eclipse 64-bit Open On-Chip Debugger 0.10.0+dev-00352-gaa6c7e9b (2018-10-20-06:18)
Licensed under GNU GPL v2
For bug reports, read
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v27 API v2 SWIM v6 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.261335
Error: init mode failed (unable to connect to the target)
in procedure 'init'
in procedure 'ocd_bouncer'

Does the nrf52832 may be bricked ? Is there some register settings that disable the swd interface ? What can I do to solve the issue ?