nRF5340 core disappears in Linux but is good in Windows

Platform: nRF5340DK PCA10095 2.0.2

SDK: nRF Connect SDK v2.6.1, Zephyr v3.5.99-ncs1-1

Tools: VS code extension for nRF Connect SDK v2024.12.55 (same version in Windows and Linux), nRF Connect for Desktop v5.1.0

Hey!

I am programming nRF5340 dev kits in Ubuntu 22.04 with VS code. It has been working fine for months. But recently two of my dev kits cannot be reset, programmed, recovered, or erased, while other same 2.0.2 boards still work fine. Logs in NCS extension for VS code are shown below:

Building blinky
west build --build-dir /home/cc/ncs/v2.6.1/zephyr/samples/basic/blinky/build_5340 /home/cc/ncs/v2.6.1/zephyr/samples/basic/blinky

ninja: no work to do.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: nRF Connect: Flash: blinky/build_5340 (active) 

Flashing build_5340 to 1050080594
west flash -d /home/cc/ncs/v2.6.1/zephyr/samples/basic/blinky/build_5340 --skip-rebuild --dev-id 1050080594

-- west flash: using runner nrfjprog
-- runners.nrfjprog: reset after flashing requested
-- runners.nrfjprog: Flashing file: /home/cc/ncs/v2.6.1/zephyr/samples/basic/blinky/build_5340/zephyr/zephyr.hex
[error] [ Client] - Encountered error -105: Command connect_to_emu_with_snr executed for 40 milliseconds with result -105
ERROR: Unable to connect to a debugger.
[error] [ Worker] - JLinkARM.dll Open returned error 'Cannot connect to J-Link.'
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.
FATAL ERROR: command exited with status 35: nrfjprog --program /home/cc/ncs/v2.6.1/zephyr/samples/basic/blinky/build_5340/zephyr/zephyr.hex --sectorerase --verify -f NRF53 --coprocessor CP_APPLICATION --snr 1050080594

 *  The terminal process terminated with exit code: 35. 
 *  Terminal will be reused by tasks, press any key to close it.

Note that the error is independent of sample to be flashed.

While flashing the same sample code in Windows, it works fine for the two boards. I have tried massive erase in Windows using both VS code extension and nRF Connect for Desktop, didn't help. Does anybody have been into a similar issue?

Screenshots of VS code extension when connected are attached below, Windows(left), Linux(right). Chip info disappeared in Linux which I believe is absolutely abnormal.

Additionally note that serial ports work fine in both.

Parents Reply Children
  • Tried NCS SDK v2.9.0, didn't help. Also tried nrfutil device commands, didn't help either:(

    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device -V
    nrfutil-device 2.7.16 (688c8df 2025-02-17)
    commit-hash: 688c8dfc89c904714c4916c5ae3e14b8ff45fa83
    commit-date: 2025-02-17
    host: x86_64-unknown-linux-gnu
    build-timestamp: 2025-02-17T14:46:39.262745061Z
    classification: nrf-external
    
    Detected SEGGER J-Link version: JLink_V7.96h
    
    The device command version you are currently using was tested with a different J-Link version (JLink_V8.10f) than the one you have installed (JLink_V7.96h). The tested version is not required, and your J-Link version will most likely work fine. If you get issues related to J-Link with your devices, use the tested version.
    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device erase
    ❌ Failed to erase 1050080594, Emulator error: Failed to open connection
    Error: One or more erase tasks failed:
     * 1050080594: Emulator error: Failed to open connection (Generic)
    
    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device recover
    ❌ Failed to recover 1050080594, Emulator error: Failed to open connection
    Error: One or more recover tasks failed:
     * 1050080594: Emulator error: Failed to open connection (Generic)
    
    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device reset
    ❌ Failed to reset 1050080594, Emulator error: Failed to open connection
    Error: One or more reset tasks failed:
     * 1050080594: Emulator error: Failed to open connection (Generic)
    
    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device protection-get
    Error: One or more get protection status for tasks failed:
     * 1050080594: Emulator error: Failed to open connection (Generic)
    
    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device device-info
    Error: One or more device info tasks failed:
     * 1050080594: Emulator error: Failed to open connection (Generic)
    
    cc@cc-Ubuntu22:~/Desktop/proj$ ./nrfutil device core-info
    Error: One or more core info tasks failed:
     * 1050080594: Emulator error: Failed to open connection (Generic)

Related