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.

  • Sadly, it is the same result ...

    C:\Users\Sylvain>nrfjprog --version
    nrfjprog version: 9.7.2
    JLinkARM.dll version: 6.32a

    C:\Users\Sylvain>nrfjprog -f nrf52 --program s140_nrf52_6.0.0_softdevice.hex --chiperase --verify --log
    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.

    --------------------------------------------------------------------------------
    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: close_dll.
    FUNCTION: close_dll.
    --------------------------------------------------------------------------------
    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-M7
    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.
    --------------------------------------------------------------------------------
    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-M7
    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.
    

  • Do you see the same behavior if you try to flash one of the precompiled application examples from the nRF5 SDK, e.g. ble_app_hrs?

    If you omit the --verify option and flash the SoftDevice and a precompiled application, is the nRF52840 DK advertising( LED 1 blinking)? If yes, is it visible and connectable in the nRF Connect app?

    Also do you only have this one nRF52840 DK or do you have another one that you could test with?

  • Yes same behaviour with a precompiled HEX file.

    I have 2 nRF52840PDK, same behaviour with the two. When I try to program one PDK with another PDK, everything works fine.
    So, definitely I think the problem come from the chip on the custom board. Maybe the flash is damaged ... is it possible ?

  • I see the output that it tries to program 2 boards at the same time.  Is it that intended ? Could that be a conflict problem ? 

  • Yes, I think that we can rule out any driver issue then, since you're able to flash and verify another nRF52840 device. 

    Are you able to check if code actually runs on the device if you omit the --verify option? E.g. flash one of the precompiled peripheral examples that blinks a led or one of the ble examples and see if the board advertises. You could also try to compile an example yourself and see if your're able to flash and debug it for instance. 

    All our ICs are production tested so faulty devices should be screened out, but the chip might have been damaged during soldering to the PCB or it could be ESD damage. Hard to say with out examining the IC. 

Related