Hi! I have a new out-of-the-box nrf5340DK and recommended Nucleo expansion board.
I am trying to follow the instructions in https://docs.edgeimpulse.com/docs/nordic-semi-nrf5340-dk however I can not successfully flash my nrf5340 with the downloaded nrf5340.bin file.
I first tried the “drag and drop” method but got the FAIL.txt message file which had the contents “error during erase”.
I then installed the nRF Command Line Tools and attempted to flash nrf5340.bin. I used the command line
nrfjprog --program nrf5340.bin -f NRF53 --sectoranduicrerase --log
which terminated abnormally. I am including the log file contents below.
I do not believe there is a problem with the nrf5340 device itself as I am able to successfully flash and run the Heart Rate Monitor sample successfully.
Any help would be appreciated, as my task is to demonstrate Edge Impulse features running on the nrf5340 asap. Thanks!
== nrfjprog log file contents - the output stops abruptly when the nrfjprog executable ‘crashes’ ==
[2021-Feb-06 13:05:01] [ info] --------------------------------------------------------------------------------
[2021-Feb-06 13:05:01] [ info] nrfjprog --program nrf5340.bin -f NRF53 --sectoranduicrerase --log
[2021-Feb-06 13:05:01] [ info] nrfjprog version 10.12.1
[2021-Feb-06 13:05:01] [ info] --------------------------------------------------------------------------------
[2021-Feb-06 13:05:01] [debug] [ nRF0x0] - open_dll
[2021-Feb-06 13:05:01] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF53_NRFJPROG.dll.
[2021-Feb-06 13:05:01] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Feb-06 13:05:01] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Feb-06 13:05:01] [ info] [Backend] - Logger callback at 0x262020 registered in Segger backend logger.
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Logger callback at 0x262020 registered in JLink logger.
[2021-Feb-06 13:05:01] [debug] [nRF530x0] - open
[2021-Feb-06 13:05:01] [debug] [Backend] - open_dll
[2021-Feb-06 13:05:01] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Feb-06 13:05:01] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2021-Feb-06 13:05:01] [ info] [Backend] - Library loaded, loading member functions.
[2021-Feb-06 13:05:01] [ info] [Backend] - Member functions succesfully loaded.
[2021-Feb-06 13:05:01] [debug] [Backend] - dll_version
[2021-Feb-06 13:05:01] [ info] [Backend] - Segger dll version 6.88.a loaded.
[2021-Feb-06 13:05:01] [debug] [ nRF0x0] - enum_emu_snr
[2021-Feb-06 13:05:01] [debug] [nRF530x0] - enum_emu_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:05:01] [debug] [Backend] - enum_emu_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_enum_emu_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_get_num_emus
[2021-Feb-06 13:05:01] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:05:01] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Feb-06 13:05:01] [debug] [nRF530x0] - connect_to_emu_with_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:05:01] [debug] [Backend] - connect_to_emu_with_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_enum_emu_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_get_num_emus
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_connect_to_emu_with_snr
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_connect_to_emu_without_snr
[2021-Feb-06 13:05:01] [ info] [Backend] - Segger logging enabled.
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Decompressing FW timestamp took 104 us
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Hardware: V1.00
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] S/N: 960137168
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] OEM: SEGGER
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] TELNET listener socket opened on port 19021
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Starting webserver
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Webserver running on local port 19080
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 17.086ms returns “O.K.”
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetHWStatus(…)
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.172ms returns 0
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“SetRestartOnClose = 0”, …).
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.007ms returns 0x01
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“DisableFlashDL”, …).
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.004ms returns 0x00
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“ExcludeFlashCacheRange 0x0-0xFFFFFFFF”, …).
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.003ms returns 0x00
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog(…)
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.017ms returns 0
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_TIF_Select(JLINKARM_TIF_SWD)
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.525ms returns 0x00
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetSpeed(2000)
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.056ms
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetSN()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.007ms returns 960137168
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_load_core_data
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“CORESIGHT_SetIndexAHBAPToUse = 0”, …).
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.004ms returns 0x00
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“device = Cortex-M33”, …).
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully.
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Device “CORTEX-M33” selected.
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] Device “CORTEX-M33” selected.
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 28.247ms returns 0x00
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [debug] [Backend] - read_debug_port_idr
[2021-Feb-06 13:05:01] [debug] [Backend] - read_debug_port_register
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_read_debug_port_register
[2021-Feb-06 13:05:01] [debug] [Backend] - coresight_configure
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_Configure()
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] - 0.552ms returns 0
[2021-Feb-06 13:05:01] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:05:01] [debug] [Backend] - —just_select_debug_port_register
[2021-Feb-06 13:05:01] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Feb-06 13:05:01] [ info] [ JLi[2021-Feb-06 13:09:06] [ info] --------------------------------------------------------------------------------
[2021-Feb-06 13:09:06] [ info] nrfjprog --program nrf5340.bin -f NRF53 --sectoranduicrerase --log
[2021-Feb-06 13:09:06] [ info] nrfjprog version 10.12.1
[2021-Feb-06 13:09:06] [ info] --------------------------------------------------------------------------------
[2021-Feb-06 13:09:06] [debug] [ nRF0x0] - open_dll
[2021-Feb-06 13:09:06] [ info] [ nRF0x0] - Load library at C:\Program Files (x86)\Nordic Semiconductor\nrf-command-line-tools\bin\JLINKARM_NRF53_NRFJPROG.dll.
[2021-Feb-06 13:09:06] [ info] [ nRF0x0] - Library loaded, loading member functions.
[2021-Feb-06 13:09:06] [ info] [ nRF0x0] - Member functions succesfully loaded.
[2021-Feb-06 13:09:06] [ info] [Backend] - Logger callback at 0x262020 registered in Segger backend logger.
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Logger callback at 0x262020 registered in JLink logger.
[2021-Feb-06 13:09:06] [debug] [nRF530x0] - open
[2021-Feb-06 13:09:06] [debug] [Backend] - open_dll
[2021-Feb-06 13:09:06] [ info] [Backend] - No J-Link DLL path was provided. Attempting to auto detect.
[2021-Feb-06 13:09:06] [ info] [Backend] - Load library at C:\Program Files (x86)\SEGGER\JLink\JLinkARM.dll.
[2021-Feb-06 13:09:06] [ info] [Backend] - Library loaded, loading member functions.
[2021-Feb-06 13:09:06] [ info] [Backend] - Member functions succesfully loaded.
[2021-Feb-06 13:09:06] [debug] [Backend] - dll_version
[2021-Feb-06 13:09:06] [ info] [Backend] - Segger dll version 6.88.a loaded.
[2021-Feb-06 13:09:06] [debug] [ nRF0x0] - enum_emu_snr
[2021-Feb-06 13:09:06] [debug] [nRF530x0] - enum_emu_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:09:06] [debug] [Backend] - enum_emu_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_enum_emu_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_get_num_emus
[2021-Feb-06 13:09:06] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:09:06] [debug] [ nRF0x0] - connect_to_emu_with_snr
[2021-Feb-06 13:09:06] [debug] [nRF530x0] - connect_to_emu_with_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:09:06] [debug] [Backend] - connect_to_emu_with_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - is_connected_to_emu
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_enum_emu_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_get_num_emus
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_connect_to_emu_with_snr
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_connect_to_emu_without_snr
[2021-Feb-06 13:09:06] [ info] [Backend] - Segger logging enabled.
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Firmware: J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Decompressing FW timestamp took 143 us
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Hardware: V1.00
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] S/N: 960137168
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] OEM: SEGGER
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] TELNET listener socket opened on port 19021
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Starting webserver
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] WEBSRV Webserver running on local port 19080
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 16.619ms returns “O.K.”
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_Lock()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetHWStatus(…)
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.184ms returns 0
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“SetRestartOnClose = 0”, …).
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.006ms returns 0x01
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“DisableFlashDL”, …).
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.004ms returns 0x00
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“ExcludeFlashCacheRange 0x0-0xFFFFFFFF”, …).
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.003ms returns 0x00
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetHookUnsecureDialog(…)
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.018ms returns 0
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_TIF_Select(JLINKARM_TIF_SWD)
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.600ms returns 0x00
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_SetSpeed(2000)
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.069ms
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_GetSN()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.007ms returns 960137168
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_load_core_data
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“CORESIGHT_SetIndexAHBAPToUse = 0”, …).
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.004ms returns 0x00
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_ExecCommand(“device = Cortex-M33”, …).
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully.
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Device “CORTEX-M33” selected.
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] Device “CORTEX-M33” selected.
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 27.612ms returns 0x00
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [debug] [Backend] - read_debug_port_idr
[2021-Feb-06 13:09:06] [debug] [Backend] - read_debug_port_register
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_read_debug_port_register
[2021-Feb-06 13:09:06] [debug] [Backend] - coresight_configure
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_CORESIGHT_Configure()
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] - 0.545ms returns 0
[2021-Feb-06 13:09:06] [ info] [ JLink] - [Info ] [JLink ] JLINK_HasError()
[2021-Feb-06 13:09:06] [debug] [Backend] - —just_select_debug_port_register
[2021-Feb-06 13:09:06] [debug] [Backend] - Select AP 255, DP Bank 0, AP Bank 255
[2021-Feb-06 13:09:06] [ info] [ JLi