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

nrfjprog program fail in JlinkARM.dll

Hi I'm using the Jlink to program nRF52832_XXAA, by using nRF command V9.0.0 nrfjprog I success in erase , but I can't program correctly,I tried Jlink version 5.12g and 6.10i in JlinkARM.dll version. Both can not work.

When I'm using the nRFgo Studio, also show the message: JlinkARM.dll can't find or use. Can anyone help? Thanks a lot

nrfjprog -s 600103256 -e --log
nrfjprog verion 9.0.0
--------------------------------------------------------------------------------
FUNCTION: open_dll.
FUNCTION: open_dll.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_without_snr.
FUNCTION: enum_emu_snr.
Device "NRF52832_XXAA" selected.
FUNCTION: read_device_version.
FUNCTION: read_device_version.
Found SWD-DP with ID 0x2BA01477
AP-IDR: 0x24770011, Type: AHB-AP
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
FUNCTION: read_region_0_size_and_source.
FUNCTION: read_region_0_size_and_source.
FUNCTION: disable_bprot.
FUNCTION: disable_bprot.
FUNCTION: erase_all.
FUNCTION: erase_all.
FUNCTION: sys_reset.
FUNCTION: sys_reset.
FUNCTION: close_dll.
FUNCTION: close_dll.


nrfjprog -s 600103256 --program keyringForTest_v1.hex --log
nrfjprog verion 9.0.0
--------------------------------------------------------------------------------
FUNCTION: open_dll.
FUNCTION: open_dll.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_without_snr.
FUNCTION: enum_emu_snr.
Device "NRF52832_XXAA" selected.
FUNCTION: read_device_version.
FUNCTION: read_device_version.
Found SWD-DP with ID 0x2BA01477
AP-IDR: 0x24770011, Type: AHB-AP
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl 0 @ E00FF000
ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 000BB00C SCS
ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl 0 [5]: FFF42000, CID: B105900D, PID: 000BB925 ETM
FUNCTION: readback_status.
FUNCTION: readback_status.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
FUNCTION: close_dll.
FUNCTION: close_dll.
  • Same thing is happening to me but only on our new boards with use the NRF52 in the wafer scale package (super small and amazing tho!)

    I flashed one board, was happy that new board was working, then tried to reflash it with new code (and pin layouts) and it wouldn't connect.

    Swapped to another fresh board, flashed it, happy that it worked (Led lit up) and then went to reflash it and again, couldn't connect.

    I'm going to run out of boards at this rate!

    JLinkExe -if swd -device nrf52
    SEGGER J-Link Commander V6.12j (Compiled Feb 15 2017 18:03:21)
    DLL version V6.12j, compiled Feb 15 2017 18:03:08
    
    Connecting to J-Link via USB...O.K.
    Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Nov 14 2016 16:58:29
    Hardware version: V1.00
    S/N: 682322937
    VTref = 3.300V
    
    
    Type "connect" to establish a target connection, '?' for help
    J-Link>connect
    Specify target interface speed [kHz]. <Default>: 4000 kHz
    Speed>
    Device "NRF52" selected.
    
    
    Found SWD-DP with ID 0x2BA01477
    Found SWD-DP with ID 0x2BA01477
    AP-IDR: 0x24770011, Type: AHB-AP
    AHB-AP ROM: 0xE00FF000 (Base addr. of first ROM table)
    
    ****** Error: DAP error while reading AIRCR / CPUID register
    Communication timed out: Requested 20 bytes, received 0 bytes !
    Could not read hardware status!
    Cannot connect to target.
    J-Link>
    

    Bit annoying any stopping us at the moment. Note that I do create a combined bootloader/SD/app and prefix some special settings for registers as a hex file. But this never caused a problem on the standard package boards.

    I get the feeling I'm turning on some protection mode....

  • Right, sheesh, this was hard to track down.

    GPIO P0.21 (/RESET!) was going via an LED to VCC.

    In the makefiles (like most peoples) this is defined CONFIG_GPIO_AS_PINRESET for C and ASM for Bootloader AND Application

    This was causing it to get stuck in a state that I couldn't then access it as I configured that pin as an output to drive LED.

    Disconnected and left floating and no problem getting in with the debugger.

    Making the change to makefiles that should resolve.

Related