This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error programming external nRF52 with Dev Kit: Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: Unknown value (ffffff24)

I'm trying to program an nRF52 on a custom PCB using the nRF52-DK and am getting an error when connecting with nRF Connect v3.6.1.

I made the following connections from the P0.19 "Debug Out" header of my nRF52-DK to my PCB according to the guidelines.

DK Debug Out Custom PCB
VTG 3.3V

GND_DETECT

GND

GND
SWDIO SWDIO
SWDCLK SWDCLK
SWO P0.18/TRACEDATA[0]/SWO
RESET RESET

The device appears in the list of available connections in nRF Connect as PCA10040 through a serial port, but gives the following error when selected:

Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: Unknown value (ffffff24)

I've confirmed power on the PCB is 3.3V and checked the programming header connections, so I'm not sure what could be the issue. Thanks in advance for any help.

  • Note the VTG pin is a voltage sense line (VDD Detect), not a supply line. The custom PCB requires a VDD supply, which can be taken from P20 VDD on the PCA10040 DK board.

    I should probably add that in the absence of the VDD supply to the external PCB the digital pins will phantom power (backdrive) the PCB via the internal schottky protection diodes which means you might measure a voltage on the PCB but it will be of insufficient power to allow programming the PCB.

  • I'm not using the DK to power the PCB - I have an external power supply and a 3.3V voltage regulator onboard.

  • Ah, in that case I would suggest doing an unconditional flash erase all, particularly if the PCB is using a module which may have protections set. If that doesn't help it's almost time for the Nordic team to be on line :-)

  • Hi,

     

    I've confirmed power on the PCB is 3.3V and checked the programming header connections, so I'm not sure what could be the issue. Thanks in advance for any help.

    Try powering your external board from the nRF52-DK. This will ensure that the voltage is equal on both your custom board and the DK, as the DK does not have level shifters for debug out.

     

    What I usually do is that I program blinky on my DK, and then connect my external board and do a "nrfjprog -e".

    If the operation succeeds and DK stops blinking, I'm targeting the wrong device.

     

    Kind regards,

    Håkon 

  • Hi Håkon, thanks for the suggestion.

    To ensure logic level compatibility, I have powered my PCB with 3.0V from the DK.

    Even then, I get the same error in nRF Connect Programmer:

    Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4) Lowlevel error: Unknown value (ffffff24)

    Starting with blinky on the DK and running nrfjprog -e with Debug Out connected to my PCB does not stop the blinking LEDs on the DK, so it is attempting to target my PCB.

    I also tried the following commands:

    nrfjprog --family nrf52 --reset
    ERROR: Cannot connect to any nRF device. Please make sure a device is
    ERROR: connected to the debugger and supplied.
    nrfjprog -f nrf52 --recover
    Recovering device. This operation might take 30s.
    ERROR: Recover failed. Please make sure that the correct device family is given
    ERROR: and try again.

    Is there something else I could try to find out why it is unable to connect?

Related