I'm trying to get the PPK working when connected to aNRF52840-DK, but getting the error -Error while setting up device [REDACTED_SERIAL]: Error occured when close opened device. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a).
This only seems to happen when the PPK is connected to the DK - the DK works fine by itself (or seems to at least); the PPK works fine when I use it standalone and connect it through a different JLINK programmer; but when I try to use both together I get the error.
I've set up up as per the documentation (set all switches and cut the jumper), updated nRF Connect and updated to the latest JLINK drivers. I've tried downgrading both app and drivers, with no success there either. I've also tried erasing the DK and re-flashing the PPK but neither have had any effect.
Could anybody shed any light on this please? The only thread I can find that's similar (https://devzone.nordicsemi.com/f/nordic-q-a/37234/not-possible-to-use-ppk-while-debugging) suggests its a JLINK driver fault, but that was 11 months ago so surely that would have been fixed by now? I'm also not trying to debug or anything, I'm just trying to get a measurement.
The log I get is as follows (I've x'd out any personal information).
2019-08-07T19:23:57.339Z INFO Application data folder: /Users/XXXXXXXX/Library/Application Support/nrfconnect/pc-nrfconnect-ppk2019-08-07T19:23:57.343Z INFO App initialized2019-08-07T19:23:57.629Z DEBUG App pc-nrfconnect-ppk v2.2.0 official2019-08-07T19:23:57.629Z DEBUG App path: /Users/XXXXXXXXXXX/.nrfconnect-apps/node_modules/pc-nrfconnect-ppk2019-08-07T19:23:57.629Z DEBUG nRFConnect 3.0.0 is supported by the app (^3.0.0)2019-08-07T19:23:57.629Z DEBUG nRFConnect path: /Applications/nRF Connect.app/Contents/Resources/app.asar2019-08-07T19:23:57.629Z DEBUG HomeDir: /Users/XXXXXXXXXXX2019-08-07T19:23:57.629Z DEBUG TmpDir: /var/folders/30/zvpj033s0b51hbn_29547t5c0000gn/T/2019-08-07T19:23:57.630Z VERBOSE Could not fetch serial number for serial port at /dev/tty.Bluetooth-Incoming-Port2019-08-07T19:24:00.708Z INFO Validating firmware for device with s/n XXXXXXXXXXXXX2019-08-07T19:24:00.711Z INFO PPK closed2019-08-07T19:24:02.554Z ERROR Error while setting up device XXXXXXXXXXXXXX: Error occured when close opened device. Errorcode: CouldNotOpenDevice (0x4)Lowlevel error: JLINKARM_DLL_ERROR (ffffff9a)
2019-08-07T19:24:02.554Z INFO Deselecting device2019-08-07T19:24:02.556Z INFO PPK closed
Do you have a 10-pin debugger cable? Could you try connecting one to the debug out on the DK and debug in on the PPK to see if that makes a difference? There have been issues in the past where the other header pins from the nRF52840DK have been interfering with the PPK. What are you using as a power source? Can you tell me what positions the switches on the PPK is set to?
Sorry for the delay in getting back to you.
I've just tried with a 10 pin cable and that seems to connect with no errors, but how do I measure the DK current by connecting it in this way?
I can set it up to measure an external device by connecting debug out on DK to debug in on PPK, DUT select set to external, power set to USB reg, and COM switch set to EXT, - essentially the same set up as https://infocenter.nordicsemi.com/topic/ug_ppk/UG/ppk/PPK_user_guide_PPK_on_customHW_standalone.html - but with the DK as the J-Link.
This seems to work for the most part but i'm then getting an error "Corrupt data detected, please check connection to PPK." every 5 minutes or so and have to reconnect a few times to get it to kick back in.