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.

Parents
  • 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 

Reply
  • 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 

Children
  • 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?

  • Hi,

     

    Noelle said:

    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:

     Could you double-check if your device has the correct 10 pin swd layout, and that the connector isn't mounted 180 degrees incorrect? Note that the red wire on the 10 pin interconnect cable indicate pin one, which should match on both ends (debugger and custom board)

     

    You could also try "J-Link Commander" and connect using this software. This should give a readout of the custom boards VDD as well.

     

    Kind regards,

    Håkon

  • I am using a 6-pin header connected as described above (same as 10-pin header but with GND/GNDDetect combined, and no NC/TDI pin). I have double-checked the layout. There is one pin improperly connected on the nRF52 - reset - but I read in the product specification that pin reset is disabled by default, so I assume this is not an issue.

    Can J-Link Commander be used with the DK debugger? 

    Thanks,

    Noelle

  • Hi,

     

    Noelle said:
    Can J-Link Commander be used with the DK debugger? 

    Yes. This is a tool that comes with the segger driver installation, and can be used with all our nRF5-series (and nRF9160DK) devices.

     

    Kind regards,

    Håkon 

  • Hi,

    J-Link Commander is also unable to connect.

    Connecting to J-Link via USB...O.K.
    Firmware: J-Link V11 compiled Nov 12 2020 10:07:08
    Hardware version: V11.00
    S/N: 261011556
    License(s): FlashBP, GDB
    OEM: SEGGER-EDU
    VTref=3.303V

    Connecting to target via SWD
    InitTarget() start
    InitTarget() end
    Found SW-DP with ID 0x2BA01477
    Failed to power up DAP

    I've switched to a full J-Link programmer/debugger, so the 3.3V logic level should not be an issue.

    I am not sure what else to try at this point. Do you have any other suggestions?

    Noelle

Related