This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF Connect Programmer not able to probe devices after updating J-Link drivers

Hi.  I'm working on several projects, some of which are not using Nordic chips.  I installed the latest Segger J-Link drivers to support a different project.  I believe this up-revved the drivers included with the nRF Connect Programmer.  It looks like the update has caused the nRF Connect Programmer to fail, however, as I can't talk to the nRF5340 Audio DK.  How may I get both pieces of software to co-exist harmoniously?  Logs and system report attached.


2021-08-04T10:03:24.174Z INFO Application data folder: C:\Users\Jason.Bens\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer
2021-08-04T10:03:24.301Z DEBUG App pc-nrfconnect-programmer v1.4.11 official
2021-08-04T10:03:24.301Z DEBUG App path: C:\Users\Jason.Bens\.nrfconnect-apps\node_modules\pc-nrfconnect-programmer
2021-08-04T10:03:24.301Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
2021-08-04T10:03:24.301Z DEBUG nRFConnect path: C:\Users\Jason.Bens\AppData\Local\Programs\nrfconnect\resources\app.asar
2021-08-04T10:03:24.302Z DEBUG HomeDir: C:\Users\Jason.Bens
2021-08-04T10:03:24.302Z DEBUG TmpDir: C:\Users\JASON~1.BEN\AppData\Local\Temp
2021-08-04T10:03:24.315Z INFO Using nrfjprog library 10.12.1, pc-nrfjprog-js 1.7.6
2021-08-04T10:03:25.175Z ERROR Error while probing devices: Error occured when get serial numbers. Errorcode: CouldNotCallFunction (0x9)
Lowlevel error: INVALID_OPERATION (fffffffe)

2021-08-04T10:05:29.161Z INFO Using nrfjprog to communicate with target
2021-08-04T10:05:29.164Z ERROR Could not fetch memory size of target devkit: Error: Error occured when get library info. Errorcode: CouldNotOpenDevice (0x4)
Lowlevel error: INVALID_OPERATION (fffffffe)

2021-08-04T10:05:36.635Z INFO Generating system report...
2021-08-04T10:05:55.979Z INFO System report: C:\Users\Jason.Bens\AppData\Roaming\nrfconnect\pc-nrfconnect-programmer\nrfconnect-system-report-2021-08-04T10-05-36.635Z.txt
# nRFConnect System Report - 2021-08-04T10-05-36.635Z

- System:     Dell Inc. Precision 3560
- BIOS:       Dell Inc. DELL   - 2
- CPU:        1 x 11th Gen Intel® Core™ i7-1165G7 2.8 GHz 8 cores (4 physical)
- Memory:     9 GB free of 15.7 GB total
- Filesystem: C: (NTFS) 476.3 GB 24.7% used

- OS:         Microsoft Windows 10 Enterprise (10.0.19042) win32 ia32

- Versions
    - kernel: 10.0.19042
    - git: 2.32.0.windows.1
    - node: 12.13.0
    - python: 3.9.5
    - python3: 

- Connected devices:
    - COM19: 000960374295 

Parents
  • nRF Connect BLE log, as well, as it looks like it may be a bit more informative:

    2021-08-04T10:12:05.889Z INFO Application data folder: C:\Users\Jason.Bens\AppData\Roaming\nrfconnect\pc-nrfconnect-ble
    2021-08-04T10:12:05.981Z DEBUG App pc-nrfconnect-ble v2.5.2 official
    2021-08-04T10:12:05.981Z DEBUG App path: C:\Users\Jason.Bens\.nrfconnect-apps\node_modules\pc-nrfconnect-ble
    2021-08-04T10:12:05.981Z DEBUG nRFConnect 3.7.0, required by the app is (^3.6.0)
    2021-08-04T10:12:05.981Z DEBUG nRFConnect path: C:\Users\Jason.Bens\AppData\Local\Programs\nrfconnect\resources\app.asar
    2021-08-04T10:12:05.982Z DEBUG HomeDir: C:\Users\Jason.Bens
    2021-08-04T10:12:05.982Z DEBUG TmpDir: C:\Users\JASON~1.BEN\AppData\Local\Temp
    2021-08-04T10:12:06.022Z INFO Updated list of uuids with data from https://github.com/NordicSemiconductor/bluetooth-numbers-database/tree/master/v1
    2021-08-04T10:12:06.900Z ERROR Error while probing devices: Error occured when get serial numbers. Errorcode: CouldNotCallFunction (0x9)
    Lowlevel error: INVALID_OPERATION (fffffffe)
    
    2021-08-04T10:12:09.542Z INFO Device setup completed
    2021-08-04T10:12:09.542Z INFO Opening custom device
    2021-08-04T10:12:09.542Z INFO Note: firmware must be compatible with connectivity firmware version: 4.1.2, SoftDevice API version: 5 and baud rate: 1000000.
    2021-08-04T10:12:09.545Z INFO Opening adapter connected to COM19
    2021-08-04T10:12:10.495Z INFO Successfully opened COM19. Baud rate: 1000000. Flow control: none. Parity: none.
    2021-08-04T10:12:10.496Z DEBUG State change: STATE_START -> STATE_RESET
    2021-08-04T10:12:10.496Z DEBUG        1 ->  [N/A] type:          RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    2021-08-04T10:12:10.500Z INFO Reset performed on adapter COM19
    2021-08-04T10:12:10.805Z DEBUG State change: STATE_RESET -> STATE_UNINITIALIZED
    2021-08-04T10:12:10.805Z DEBUG        2 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2021-08-04T10:12:11.056Z DEBUG        3 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2021-08-04T10:12:11.316Z DEBUG        4 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2021-08-04T10:12:11.567Z DEBUG        5 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2021-08-04T10:12:11.817Z DEBUG        6 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2021-08-04T10:12:12.072Z DEBUG        7 ->  [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2021-08-04T10:12:12.323Z DEBUG State change: STATE_UNINITIALIZED -> STATE_NO_RESPONSE
    2021-08-04T10:12:12.324Z ERROR Received status with code 0 PKT_SEND_MAX_RETRIES_REACHED, message: 'No response from device. Tried to send packet 6 times.'
    2021-08-04T10:12:13.502Z DEBUG serial port read on port COM19 aborted.
    2021-08-04T10:12:13.520Z ERROR Error occured when opening port. Errorcode: NRF_ERROR_TIMEOUT (0xd)
    
    

  • Hello,

    The BLE app in nRF connect for desktop does not support the nRF53 series, so the last error is as expected. However, I'm not sure why you get the programming error, could be a compatibility issue like you said. Logs shows indicates that the PC has problems communicating with the debugger (more common to have communication issues between jlink and target) Can you try to our command line tool nrfjprog for programming and see if you get the same result?

  • nrfjprog is having trouble finding the correct DLL.  If I run nrfjprog -v, I get the "ERROR: JLinkARM DLL is invalid. Please reinstall latest JLinkARM DLL.".  I can work around that by using the -jdll argument, but I'm not sure it's working correctly.  I was able to successfully erase the memory, but programming it again with the same bitfile doesn't seem to do anything.

  • Which version of Jlink did you install? I need to try and see if I can replicate this here.

  • At the moment, I've got J-Link version 7.52 installed, along with the 7.50 version installed by nrfjprog.  Both of these versions were 64-bit, it turns out.  Installing the 32-bit version of 7.50 puts the dll on nrfjprog's search path, which resolves that issue.

    At the moment, it looks like I can connect to the IC, but programming the network core is failing in both the nRF Connect programmer and nrfjprog.  Log files are attached for both tools.  I've also confirmed that I can write to both cores using J-link Commander without major issue (had to reduce the interface speed to 2000 kHz).

    27841.log.log

      2021-08-04T12_51_52.603Z-log.txt

Reply
  • At the moment, I've got J-Link version 7.52 installed, along with the 7.50 version installed by nrfjprog.  Both of these versions were 64-bit, it turns out.  Installing the 32-bit version of 7.50 puts the dll on nrfjprog's search path, which resolves that issue.

    At the moment, it looks like I can connect to the IC, but programming the network core is failing in both the nRF Connect programmer and nrfjprog.  Log files are attached for both tools.  I've also confirmed that I can write to both cores using J-link Commander without major issue (had to reduce the interface speed to 2000 kHz).

    27841.log.log

      2021-08-04T12_51_52.603Z-log.txt

Children
  • Interesting. I guess you installed the 32-bit version of nrfjprog. But have you tried to unlock the network core by running nrfjprog --recover first?

    nrfjprog --recover --coprocessor CP_NETWORK
    nrfjprog --recover

    Note

    Make sure to recover the network core before you recover the application core.

    The --recover command erases the flash memory and then writes a small binary into the recovered flash memory. This binary prevents the readback protection from enabling itself again after a pin reset or power cycle.

    Recovering the network core erases the flash memory of both cores. Recovering the application core erases only the flash memory of the application core. Therefore, you must recover the network core first. Otherwise, if you recover the application core first and the network core last, the binary written to the application core is deleted and readback protection is enabled again after a reset. (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_nrf5340.html#readback-protection)

  • Ah, I wasn't aware of that behaviour.  Using nrfjprog to recover in the order you've specified, then writing to the network core, then finally the app core seems to work fine.  In the same vein, the nRF Connect Programmer also succeeds if I separately write to the network core, then to the app core.  That's good enough for me.  Thanks for your help.

Related