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

Hi all,

I have a nrf52832 board from holyiot (https://pl.aliexpress.com/store/product/Nordic-nRF52832-module-Bluetooth-low-energy-development-board-for-BLE-mesh/420533_32867403706.html?spm=a2g17.12010612.8148356.5.1edccaa2UOD3RM). 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:

int
main (int argc, char* argv[])
{
while (1)
{
__WFE();
}
}

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
openocd.org/.../bugs.html
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 ?