Hi all,
I recently bought two nrf52840 dongles (pca10059), and I haven't been able to connect to them with my SWD debugger. I have several other nrf52 boards (52840 and 52833), both commercial development boards and custom PCBs, and I've been able to debug all of them just fine over SWD. When I connect power, ground, SWDIO, and SWDCLK on my dongles, though, I can't seem to do anything: openOCD connects, but none of the debug commands (halt the CPU, inspect memory location, program into flash) work. I observed this behavior on both a dongle that I'd been using for a few days and on one fresh out of the package.
The only clue I seem to have is in the openocd output when it starts up: on a working board (this output is from an nrf52833 custom PCB, but nrf52840 should be the same), I see this in the startup log:
Info : nrf52.cpu: hardware has 6 breakpoints, 4 watchpoints
whereas on the dongle, I see
Info : nrf52.cpu: hardware has 0 breakpoints, 2 watchpoints
Is there some special consideration for the pca10059 that I haven't thought of? I've tried both USB-powering the board (with a shared-ground to the debugger) as well as changing the jumpers to use external power (as described in the documentation) and powering directly with 3.3v. Does the stock bootloader enable APPROTECT, and if so, how can I disable it? I don't currently have access to a J-Link, though I could maybe try the raspberry pi based method described here (I haven't yet, since I'll need to track down a pi if that's necessary).
Hopefully I'm just missing something obvious, but I have no idea what it might be.
Thanks!