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

Custom board programming failed

Hello,

I'm trying to program my custom board with a PCA10056 following this scheme (Note that my custom board is powered by the PCA10056) :

VDD (PCA10056)          ---> VTG(PCA10056)
VDD (PCA10056)          ---> VDD (CustomBoard)
GND (PCA10056)          ---> GND (CustomBoard)
GND (PCA10056)          ---> GND Detect (PCA100056)
SWD IO (PCA10056)     ---> SWD IO (CustomBoard)
SWD CLK (PCA10056)  ---> SWD CLK (CustomBoard)

I'm able to erase my custom board and connect to it but I can't program the flash ... When I try to program the softdevice the I got a ''verification fail''. But after that my flash memory seems to have 2 region like that:

The voltage on my custom board is good (2.96V, the same as the PCA10056) and I have already done a recover but no effect. Here's the result:

nrfjprog --recover -f nrf52
Recovering device. This operation might take 30s.
Erasing user code and UICR flash areas.

I don't know what I can test now ... Could anyone help me ?

Kind regards,
Sylvain.

  • The connections look good and since you're able to erase and flash, but not verify, then I do not think this is a connection issue. 

    Could you try to program the SoftDevice using nrfjprog and not nRFGo Studio using the following command:

    nrfjprog -f nrf52 --program <name of softdevice hex>.hex --chiperase --verify 

  • Here're the results :

    C:\Users\Sylvain>nrfjprog -f nrf52 --program s140_nrf52_6.0.0_softdevice.hex --chiperase --verify
    Parsing hex file.
    Erasing user available code and UICR flash areas.
    Applying system reset.
    Checking that the area to write is not protected.
    Programing device.
    Verifying programming.
    ERROR: Write verify failed.

    It is the same problem as previous...

  • Which version of nrfjprog and which JlinkARM.dll version are you using( You can check by running nrfjprog --version) ? If you're not using nrjfprog v9.7.2 and/or JLinkARM.dll v6.32a, then please update to the latest version. 

    If you are using the latest versions, then could you run the same command with the --log option, i.e. 

    nrfjprog -f nrf52 --program s140_nrf52_6.0.0_softdevice.hex --chiperase --verify --log

    This will generate a log.log file in the directory where you called nrfjprog. Please attach it to this case.

  • My version of nrfjprog is the last one. I downloaded and installed this file nRF5x toolset installer for Windows (JLinkARM, JLink CDC, nRFjprog, and mergehex) V9.7.2.

    Result in the terminal:

    nrfjprog version: 9.7.2
    JLinkARM.dll version: 6.20i

    The log file is attached to this post.

    --------------------------------------------------------------------------------
    nrfjprog -f nrf52 --program s140_nrf52_6.0.0_softdevice.hex --chiperase --verify --log
    nrfjprog verion 9.7.2
    --------------------------------------------------------------------------------
    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 SW-DP with ID 0x2BA01477
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x02880000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    FUNCTION: readback_status.
    FUNCTION: readback_status.
    FUNCTION: erase_all.
    FUNCTION: erase_all.
    FUNCTION: sys_reset.
    FUNCTION: sys_reset.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    FUNCTION: power_ram_all.
    FUNCTION: power_ram_all.
    FUNCTION: is_qspi_init.
    FUNCTION: is_qspi_init.
    FUNCTION: read_region_0_size_and_source.
    FUNCTION: read_region_0_size_and_source.
    FUNCTION: disable_bprot.
    FUNCTION: disable_bprot.
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    FUNCTION: write.
    FUNCTION: write.
    FUNCTION: write.
    FUNCTION: write.
    FUNCTION: is_qspi_init.
    FUNCTION: is_qspi_init.
    FUNCTION: read.
    FUNCTION: read.
    FUNCTION: close_dll.
    FUNCTION: close_dll.
    

  • Could you try to update to JLinkARM.dll v6.32a  from Segger? Here is the link.  

Related