nrfjprog failed to erase nRF52832 device

I would like to use nrfjprog to erase nRF52832 device. But it failed with "An unknown error". The nRF52832 device connect to laptop through J-Link USB interface.

D:\Nordic>nrfjprog --log --family nRF52 --eraseall
[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

[error]: [SeggerBackend] - JLinkARM.dll reported "-1", "An unknown error.".

ERROR: Unable to connect to a debugger.
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

Parents Reply Children
  • I encounter another problem. I can't program softdevice if I program bootloader before program softdevice. But I can program softdevice if I don't program bootloader before program softdevice. Does it mean bootloader has problem?

    D:\nrfjprog>nrfjprog_nrf52832_hex.bat

    D:\nrfjprog>nrfjprog --family nRF52 --eraseall
    Erasing user available code and UICR flash areas.
    Applying system reset.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\bootloader.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\softdevice_s132.hex
    Parsing image file.
    ERROR: The JLinkARM DLL timed out while communicating to the J-Link probe.
    ERROR: If the error condition persists, run the same command again with
    ERROR: argument -- log, contact Nordic Semiconductor and provide the generated
    ERROR: log.log file to them.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\nrf52832_xxaa.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

    D:\nrfjprog>nrfjprog_nrf52832_hex_without_bootloader.bat

    D:\nrfjprog>nrfjprog --family nRF52 --eraseall
    Erasing user available code and UICR flash areas.
    Applying system reset.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\softdevice_s132.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\nrf52832_xxaa.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

  • After changing board.h, I can use nrfjprog to program bootloader, softdevice, and application hex file. But I still can't see log messages of bootloader.

    D:\nrfjprog>nrfjprog_nrf52832_hex.bat

    D:\nrfjprog>nrfjprog --family nRF52 --eraseall
    Erasing user available code and UICR flash areas.
    Applying system reset.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\bootloader.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\softdevice_s132.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

    D:\nrfjprog>nrfjprog --family nRF52 --program  D:\nrfjprog\nrf52832_xxaa.hex
    Parsing image file.
    WARNING: A programming operation has been performed without --verify.
    WARNING: Programming can fail without error.

  • Please use the secure_bootloader example with _debug version to get debug log. 

Related