The modem fails to write via J-link,But the application core is working

J-Link does not recognize the chip, but can write and debug normally:

The modem fails to write:

Parents
  • Hi,

    Which board do you use? 

    Where did you get modem file from?

    Could you provide more information about your screenshots?

    Best regards,
    Dejan

  • Hi,

    I used the nRF9161-DK development board and a board of my own design. When using the development board, I can burn programs written into the modem, but I can't burn successfully using the board we designed. Our board is using jlink as the emulator, perhaps because the emulator is different when burning?


    modem file: mfw_nrf91x1_2.0.0 is downloaded from the official website.

    The first screenshot shows that VsCode cannot detect the chip when connecting the board we designed using jlink, but can burn and debug it
    The second screenshot shows the programmer's state when burning modem firmware using jlink, unable to select the write option

  • Hi,

    Here is the verbose log:

    14:49:37.363	[PID:24372] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with device-info --serial-number 000059406895 --json --log-output=stdout --log-level trace
    14:49:38.132	[PID:24372] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:49:38.689	[PID:24372] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl
    14:49:38.833	Using nrfutil device to communicate with target via JLink
    14:49:38.833	JLink OB firmware version J-Link V9 compiled May 7 2021 16:26:12
    14:49:38.833	Device family
    14:49:38.833	Device version NRF9161_xxAA_REV3
    14:49:38.833	Board version
    14:49:38.855	Update files regions according to Application core
    14:49:38.855	Parse memory regions for file
    14:49:39.113	[PID:18780] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with protection-get --generate --core Application --json --log-output=stdout --log-level trace
    14:49:39.426	[PID:33732] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with x-execute-batch --serial-number 000059406895 --batch-json {"operations":[{"operationId":"0","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"type":"protection-get"}}]} --json --log-output=stdout --log-level trace
    14:49:40.175	[PID:33732] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:49:40.488	Reading readback protection status for Application core
    14:49:40.488	Reading readback protection status for Application core 0%
    14:49:40.490	Reading readback protection status for Application core 100%
    14:49:40.490	Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    14:49:40.491	Reading readback protection status for Application core completed
    14:49:40.613	[PID:33732] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl
    14:49:41.084	[PID:19792] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with core-info --generate --core Application --json --log-output=stdout --log-level trace
    14:49:41.114	[PID:34776] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with reset --generate --core Application --reset-kind RESET_DEBUG --json --log-output=stdout --log-level trace
    14:49:41.416	[PID:20992] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with x-execute-batch --serial-number 000059406895 --batch-json {"operations":[{"operationId":"0","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"type":"core-info"}},{"operationId":"1","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"option":"RESET_DEBUG","type":"reset"}}]} --json --log-output=stdout --log-level trace
    14:49:42.157	[PID:20992] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:49:42.497	Loading core information for Application core
    14:49:42.498	Loading core information for Application core 0%
    14:49:42.499	Update files regions according to Application core
    14:49:42.499	Parse memory regions for file
    14:49:42.532	Loading core information for Application core 100%
    14:49:42.532	Loading core information for Application core completed
    14:49:42.534	Update files regions according to Application core
    14:49:42.534	Parse memory regions for file
    14:49:42.660	[PID:20992] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl
    14:49:43.180	[PID:23260] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with protection-get --generate --core Application --json --log-output=stdout --log-level trace
    14:49:43.495	[PID:13236] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with x-execute-batch --serial-number 000059406895 --batch-json {"operations":[{"operationId":"0","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"type":"protection-get"}}]} --json --log-output=stdout --log-level trace
    14:49:44.198	[PID:13236] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:49:44.522	Reading readback protection status for Application core
    14:49:44.522	Reading readback protection status for Application core 0%
    14:49:44.537	Reading readback protection status for Application core 100%
    14:49:44.538	Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    14:49:44.538	Reading readback protection status for Application core completed
    14:49:44.642	[PID:13236] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl
    14:49:44.868	Device is loaded and ready for further operation
    14:49:52.145	Checking ZIP file: D:\ZZY\ZIP\nrf9161dk_fw_2023-10-26_1fae141f.zip
    14:49:52.145	File was last modified at 2023/12/14 13:52:14
    14:49:54.886	[PID:23400] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with recover --generate --core Application --json --log-output=stdout --log-level trace
    14:49:54.917	[PID:28884] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with core-info --generate --core Application --json --log-output=stdout --log-level trace
    14:49:54.934	[PID:24000] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with reset --generate --core Application --reset-kind RESET_DEBUG --json --log-output=stdout --log-level trace
    14:49:55.227	[PID:2292] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with x-execute-batch --serial-number 000059406895 --batch-json {"operations":[{"operationId":"0","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"type":"recover"}},{"operationId":"1","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"type":"core-info"}},{"operationId":"2","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"option":"RESET_DEBUG","type":"reset"}}]} --json --log-output=stdout --log-level trace
    14:49:55.955	[PID:2292] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:49:56.355	Recovering Application core
    14:49:56.358	Recovering Application core 0%
    14:49:56.358	[PID:2292] [jlink] Using firmware image for recovery to keep device unlocked.
    14:49:57.112	[PID:2292] [jlink] [NRFJPROG][nRF91][000059406895] Encountered error while disabling AP-protect, retrying. -21:APPROTECT is still active after CTRL-AP eraseall has finished.
    14:49:58.245	Recovering Application core 100%
    14:49:58.245	Recovering Application core completed
    14:49:58.245	Loading core information for Application core
    14:49:58.245	Loading core information for Application core 0%
    14:49:58.247	Update files regions according to Application core
    14:49:58.247	Parse memory regions for file
    14:49:58.276	Loading core information for Application core 100%
    14:49:58.277	Loading core information for Application core completed
    14:49:58.277	Update files regions according to Application core
    14:49:58.277	Parse memory regions for file
    14:49:58.389	[PID:2292] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl
    14:49:58.859	[PID:29228] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with device-info --serial-number 000059406895 --json --log-output=stdout --log-level trace
    14:49:59.614	[PID:29228] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:50:00.163	[PID:29228] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl
    14:50:00.345	Update files regions according to Application core
    14:50:00.345	Parse memory regions for file
    14:50:00.614	[PID:27232] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with protection-get --generate --core Application --json --log-output=stdout --log-level trace
    14:50:00.894	[PID:6892] nrfutil-device (version = 2.0.3, platform = x86_64-pc-windows-msvc) invoked with x-execute-batch --serial-number 000059406895 --batch-json {"operations":[{"operationId":"0","core":"NRFDL_DEVICE_CORE_APPLICATION","operation":{"type":"protection-get"}}]} --json --log-output=stdout --log-level trace
    14:50:01.635	[PID:6892] Loaded plugin C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl, starting to resolve symbols
    14:50:01.976	Reading readback protection status for Application core
    14:50:01.976	Reading readback protection status for Application core 0%
    14:50:01.986	Reading readback protection status for Application core 100%
    14:50:01.986	Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    14:50:01.986	Reading readback protection status for Application core completed
    14:50:02.083	[PID:6892] close plugin dll at path: C:\Users\RandomSky\AppData\Roaming\nrfconnect\nrfutil-sandboxes\device\2.0.3\lib\nrfutil-device\10-nrfdl-jlink-plugin.nrfdl

  • Thanks.

    The problem is probably that the underlying library only uses the serial number of the debugger to determine if the device supports writing modem FW or not.

    As a temporary workaround until we can fix the issue, can you try to use the Debug Out port on your nRF9161DK instead of a stand-alone debugger?

  • Thanks.

    May I have an approximate time for the problem? If possible, could you tell me the progress on devzone?

    So how to connect the development board hardware can use the debug port on the 9160DK?

  • I have the same issue for a custom board. Is there anything I can do? 

Reply Children
  • nrfjprog --program mfw_nrf9160_1.3.5.zip --verify this works!

  • Hello again,

    Version 4.2.0 of the Programmer app was just released with a fix for this issue.

    Could you try the new update, and see if it works for you?

    Best regards,

    Didrik

  • Hi Didrik, 

    I had to restart the application but now it works!


    2024-01-04T13:59:13.827Z DEBUG Application data folder: /Users/thijsfranssen/Library/Application Support/nrfconnect/pc-nrfconnect-programmer
    2024-01-04T13:59:14.146Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:14.149Z DEBUG App pc-nrfconnect-programmer v4.2.0 (official)
    2024-01-04T13:59:14.150Z DEBUG App path: /Users/thijsfranssen/.nrfconnect-apps/node_modules/pc-nrfconnect-programmer
    2024-01-04T13:59:14.150Z DEBUG nRFConnect 4.3.0, required by the app is (>=4.3.0)
    2024-01-04T13:59:14.150Z DEBUG nRFConnect path: /Applications/nRF Connect for Desktop.app/Contents/Resources/app.asar
    2024-01-04T13:59:14.150Z DEBUG HomeDir: /Users/thijsfranssen
    2024-01-04T13:59:14.151Z DEBUG TmpDir: /var/folders/lf/0ktnzwxj26b30w1sjmrrdh6h0000gn/T/
    2024-01-04T13:59:14.525Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:14.529Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:14.654Z INFO Using nrfutil-device version: 2.0.3
    2024-01-04T13:59:14.655Z INFO Using nrf-device-lib version: 0.17.3
    2024-01-04T13:59:14.656Z INFO Using nrfjprog DLL version: 10.23.1
    2024-01-04T13:59:14.656Z INFO Using JLink version: JLink_V7.88j
    2024-01-04T13:59:14.745Z INFO Getting serialport options from persistent store DF0BDFB40E75.pc-nrfconnect-programmer
    2024-01-04T13:59:14.754Z INFO Getting serialport options from persistent store 000801050408.pc-nrfconnect-programmer
    2024-01-04T13:59:14.755Z DEBUG Sending usage data "device connected"
    2024-01-04T13:59:14.758Z INFO Getting serialport options from persistent store A9G1HVMG.pc-nrfconnect-programmer
    2024-01-04T13:59:14.758Z DEBUG Sending usage data "device connected"
    2024-01-04T13:59:14.760Z DEBUG Sending usage data "device connected"
    2024-01-04T13:59:24.325Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:25.337Z INFO Using nrfutil device to communicate with target via JLink
    2024-01-04T13:59:25.338Z INFO JLink OB firmware version J-Link EDU Mini V1 compiled Jun  6 2023 10:50:57
    2024-01-04T13:59:25.338Z INFO Device family 
    2024-01-04T13:59:25.338Z INFO Device version NRF9160_xxAA_REV2
    2024-01-04T13:59:25.339Z INFO Board version 
    2024-01-04T13:59:25.343Z DEBUG Sending usage data "device selected"
    2024-01-04T13:59:25.344Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:25.452Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:25.730Z INFO Reading readback protection status for Application core
    2024-01-04T13:59:25.731Z INFO Reading readback protection status for Application core 0%
    2024-01-04T13:59:25.738Z INFO Reading readback protection status for Application core 100%
    2024-01-04T13:59:25.738Z INFO Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    2024-01-04T13:59:25.739Z INFO Reading readback protection status for Application core completed
    2024-01-04T13:59:25.808Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:25.810Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:25.810Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:25.875Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:26.144Z INFO Loading core information for Application core
    2024-01-04T13:59:26.146Z INFO Loading core information for Application core 0%
    2024-01-04T13:59:26.155Z INFO Loading core information for Application core 100%
    2024-01-04T13:59:26.156Z INFO Loading core information for Application core completed
    2024-01-04T13:59:26.156Z INFO Reading memory for Application core
    2024-01-04T13:59:26.156Z INFO Reading memory for Application core 0%
    2024-01-04T13:59:33.765Z INFO Reading memory for Application core 100%
    2024-01-04T13:59:34.785Z INFO Reading memory for Application core completed
    2024-01-04T13:59:34.805Z INFO Parse memory regions for Application core
    2024-01-04T13:59:34.841Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:34.898Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T13:59:35.176Z INFO Reading readback protection status for Application core
    2024-01-04T13:59:35.181Z INFO Reading readback protection status for Application core 0%
    2024-01-04T13:59:35.182Z INFO Reading readback protection status for Application core 100%
    2024-01-04T13:59:35.182Z INFO Application core protection status 'NRFDL_PROTECTION_STATUS_NONE'
    2024-01-04T13:59:35.182Z INFO Reading readback protection status for Application core completed
    2024-01-04T13:59:35.254Z INFO Device is loaded and ready for further operation
    2024-01-04T13:59:46.151Z INFO Update files regions according to Application core
    2024-01-04T13:59:46.151Z INFO Parse memory regions for file
    2024-01-04T13:59:46.249Z INFO Checking ZIP file:  /Users/thijsfranssen/Downloads/mfw_nrf9160_1.3.5.zip
    2024-01-04T13:59:46.427Z INFO File was last modified at  12/19/2023, 5:09:23 PM
    2024-01-04T14:00:01.016Z INFO Checking ZIP file:  /Users/thijsfranssen/Downloads/mfw_nrf9160_1.3.5.zip
    2024-01-04T14:00:01.017Z INFO File was last modified at  12/19/2023, 5:09:23 PM
    2024-01-04T14:00:13.970Z INFO Modem DFU starts to write...
    2024-01-04T14:00:13.973Z INFO Writing /Users/thijsfranssen/Downloads/mfw_nrf9160_1.3.5.zip to device 000801050408
    2024-01-04T14:00:13.989Z DEBUG Sending usage data "running nrfutil device"
    2024-01-04T14:00:59.760Z INFO Modem DFU completed successfully!
    

    Thanks for picking this up. 

Related