How to burn bootloader into a brand new nrf52832?

Hi, I got a brand new u-blox BMD-300-A-R soldered onto my custom PCB. I have connected the SWDIO, SWDCLK, VDD and GND to my nrf52dk according to instructions here (nRF52 Series > nRF52832 > nRF52 DK > Hardware description > Debug out for programming external boards).

I opened the Programmer v4.3.0 in nrf connect for desktop. It detected the J-Link device, but it says "No operations possible for device. If the device is a MCUboot device make sure it is in the bootloader mode". I think it's because it's a brand new MCU and doesn't have bootloader in it. 

I only have a nrf52dk in hand. Can I use it to burn bootloader onto my MCU? If so, how can I do it? Thank you very much!

Parents
  • Thank you for the reply!

    I tried to run this command in CMD, but I got the following error:

    "ERROR: The arguments provided perform no operation. Use --help to read about the valid argument combinations.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed."

    I checked nrfjprog --help, both arguments can be found as in

    "--recover Erases all user available non-volatile memory and
    disables the read back protection mechanism if
    enabled."

    and

    "-f --family <family> Selects the device family for the operation. Valid
    argument options are NRF51, NRF52, NRF53, NRF91,
    and UNKNOWN.
    If UNKNOWN family is given, an automatic family
    detection of the device is performed. Note that
    providing the actual family is faster than
    performing the automatic family detection. If
    --family option is not given, the default is taken
    from nrfjprog.ini. Must be combined with another
    command."

    Also, when I try to connect to my custom board in Programmer v4.3.0, the JLink device no longer appears. Instead, it's nRF52 DK, with UNKNOWN_FAMILY. The console says

    "

    Failed to reading readback protection status for application core core. Error: [object Object], message: Batch task protection-get failed, [jlink] JLINKARM_DLL_ERROR
    Error: Failed with exit code 1. One or more batch tasks failed: - [jlink] JLINKARM_DLL_ERROR, code: Nrfjlink. Message: Batch task protection-get failed, [jlink] JLINKARM_DLL_ERROR.

    "

Reply
  • Thank you for the reply!

    I tried to run this command in CMD, but I got the following error:

    "ERROR: The arguments provided perform no operation. Use --help to read about the valid argument combinations.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed."

    I checked nrfjprog --help, both arguments can be found as in

    "--recover Erases all user available non-volatile memory and
    disables the read back protection mechanism if
    enabled."

    and

    "-f --family <family> Selects the device family for the operation. Valid
    argument options are NRF51, NRF52, NRF53, NRF91,
    and UNKNOWN.
    If UNKNOWN family is given, an automatic family
    detection of the device is performed. Note that
    providing the actual family is faster than
    performing the automatic family detection. If
    --family option is not given, the default is taken
    from nrfjprog.ini. Must be combined with another
    command."

    Also, when I try to connect to my custom board in Programmer v4.3.0, the JLink device no longer appears. Instead, it's nRF52 DK, with UNKNOWN_FAMILY. The console says

    "

    Failed to reading readback protection status for application core core. Error: [object Object], message: Batch task protection-get failed, [jlink] JLINKARM_DLL_ERROR
    Error: Failed with exit code 1. One or more batch tasks failed: - [jlink] JLINKARM_DLL_ERROR, code: Nrfjlink. Message: Batch task protection-get failed, [jlink] JLINKARM_DLL_ERROR.

    "

Children
  • What nRF Command Line Tool version are you using? Could you update to the latest version, and then try again? 

    Could you type the following commands and provide the return?

    nrfjprog -v

    nrfjprog --device

    Provide the log by executing "nrfjprog -f nrf52 ––recover --log"

    Maybe the following can help

    https://wiki.segger.com/J-Link_cannot_connect_to_the_CPU

    https://wiki.segger.com/Incorrect_J-Link_USB_driver_installed

    https://devzone.nordicsemi.com/search?q=program%20BMD-300#serpq=program%20BMD-300 

    -Amanda H.

  • Here is the return:

    "nrfjprog -v
    nrfjprog version: 10.21.0 external
    JLinkARM.dll version: 7.94e
    "

    "nrfjprog --device --log
    ERROR: An invalid argument was provided. Use --help for a list of valid
    ERROR: arguments."

    I am not sure where the log file is saved

  • I just updated it to the latest 10.24.1. The result is the same. I am running the command from Windows Command Prompt

  • Sorry, it's "nrfjprog --deviceversion". 

    Can you execute  "nrfjprog -f nrf52 ––recover"? If not, please provide the log.

  • "nrfjprog --deviceversion
    [error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 263 milliseconds with result -102
    1050386997 - UNKNOWN
    [error] [ Worker] - An unknown error."

    "[2024-Apr-11 15:10:13] [debug] --------------------------------------------------------------------------------
    [2024-Apr-11 15:10:13] [debug] nrfjprog -f nrf52 ––recover --log
    [2024-Apr-11 15:10:13] [debug] nrfjprog version 10.24.1 external
    [2024-Apr-11 15:10:13] [debug] --------------------------------------------------------------------------------
    [2024-Apr-11 15:10:13] [ info] Load library at C:\Program Files\Nordic Semiconductor\nrf-command-line-tools\bin\nrfjprog.dll.
    [2024-Apr-11 15:10:13] [ info] Library loaded, loading member functions.
    [2024-Apr-11 15:10:13] [ info] Member functions succesfully loaded.
    [2024-Apr-11 15:10:13] [debug] [ Client] - open
    [2024-Apr-11 15:10:13] [debug] [ Client] - start
    [2024-Apr-11 15:10:13] [ info] [ Client] - stdout: Jlinkarm nRF Worker ready. Handling sequence dc3467b3-117a-44c1-92d4-df20b6a535b8.
    [2024-Apr-11 15:10:13] [trace] [ Client] - Command open executed for 23 milliseconds with result 0
    [2024-Apr-11 15:10:13] [debug] [ Client] - config
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - Logger sink registered in Segger backend logger
    [2024-Apr-11 15:10:13] [debug] [ JLink] - Logger sink registered in JLink logger
    [2024-Apr-11 15:10:13] [debug] [ nRF52] - open
    [2024-Apr-11 15:10:13] [debug] [ nRF52] - just_check_family
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - open_dll
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - No J-Link DLL path was provided. Attempting to auto detect.
    [2024-Apr-11 15:10:13] [ info] [SeggerBackend] - Load library at C:\Program Files\SEGGER\JLink_V794e\JLink_x64.dll.
    [2024-Apr-11 15:10:13] [ info] [SeggerBackend] - Library loaded, loading member functions.
    [2024-Apr-11 15:10:13] [ info] [SeggerBackend] - Member functions succesfully loaded.
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - Set batch mode
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - dll_version
    [2024-Apr-11 15:10:13] [ info] [SeggerBackend] - Segger dll version 7.94.e loaded.
    [2024-Apr-11 15:10:13] [trace] [ Worker] - Command open executed for 2 milliseconds with result 0
    [2024-Apr-11 15:10:13] [trace] [ Client] - Command config executed for 15 milliseconds with result 0
    [2024-Apr-11 15:10:13] [debug] [ Client] - enum_emu_snr
    [2024-Apr-11 15:10:13] [debug] [ nRF52] - config
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - enum_emu_snr
    [2024-Apr-11 15:10:13] [trace] [ Worker] - Command config executed for 1 milliseconds with result 0
    [2024-Apr-11 15:10:13] [debug] [ nRF52] - enum_emu_con_info
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - is_connected_to_emu
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - enum_emu_con_info
    [2024-Apr-11 15:10:13] [trace] [ Client] - Command enum_emu_con_info executed for 15 milliseconds with result 0
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - is_connected_to_emu
    [2024-Apr-11 15:10:13] [trace] [ Worker] - Command enum_emu_con_info executed for 2 milliseconds with result 0
    [2024-Apr-11 15:10:13] [debug] [ nRF52] - close
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - is_connected_to_emu
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - close
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - disconnect_from_emu
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - is_connected_to_emu
    [2024-Apr-11 15:10:13] [debug] [SeggerBackend] - Segger Backend closed.
    [2024-Apr-11 15:10:13] [debug] [ nRF52] - nRF family DLL closed
    [2024-Apr-11 15:10:13] [trace] [ Worker] - Command close executed for 13 milliseconds with result 0
    [2024-Apr-11 15:10:13] [trace] [ Client] - Command close executed for 30 milliseconds with result 0
    [2024-Apr-11 15:10:13] [debug] [ Client] - terminate
    [2024-Apr-11 15:10:13] [trace] [ Client] - Command terminate executed for 0 milliseconds with result 0
    [2024-Apr-11 15:10:13] [trace] [ Worker] - Command terminate executed for 0 milliseconds with result 0
    [2024-Apr-11 15:10:13] [trace] [ Worker] - Executed 5 commands for 18 milliseconds
    [2024-Apr-11 15:10:14] [debug] [ Client] - Worker process exited with code: 0
    [2024-Apr-11 15:10:14] [debug] [ Client] - Worker process exited with code: 0
    [2024-Apr-11 15:10:14] [debug] [ Client] - Child process terminated with result 0
    [2024-Apr-11 15:10:14] [trace] [ Client] - Executed 5 commands for 83 milliseconds
    [2024-Apr-11 15:10:14] [debug] [ Client] - terminate
    "

Related