JLink communication time out

I have been using an nRF52840 dev board and a nRF5340 dev board to program Bluetooth demos. Just today my nRF52840 board became very difficult to flash I get the error, 

-- runners.nrfjprog: reset after flashing requested
-- runners.nrfjprog: Flashing file: c:\nordic\myApps\central_fragmenter\build_nRF52840\zephyr\zephyr.hex
[ #################### ] 6.508s | Erase file - Done erasing
[error] [ JLink] - Communication timed out: Requested 4 bytes, received 0 bytes !
[error] [ Client] - Encountered error -105: Command program_file executed for 5984 milliseconds with result -105
[error] [ nRF52] - Failed while performing 'Write' operation on target address 0x00000000.
-105: Failed to read access port 1 register 3.
This indicates that the debug port is available, but the access port is not.
An unknown error.
[error] [ nRF52] - Failed while reading device information.
[error] [ Worker] - Failed to read access port 1 register 3.
This indicates that the debug port is available, but the access port is not.
An unknown error.
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 'c:\nordic\myApps\central_fragmenter\build_nRF52840\zephyr\zephyr.hex' --sectoranduicrerase --verify -f NRF52 --snr 1050237320

I get this error roughly 90% of the time when attempting to flash an application to the board. There does not seem to be any rhyme or reason as to why the board fails to flash the application. I have tried to use the nrfjprog --recover command and this does not seem to improve the rate of failure. I reran the command with the --log option aswell and have attached the log. Additionally I have attached the log from running nrfjprog -f NRF52 -r --log.

The nRF5340 does not experience this issue. 

For reference, my toolchain is v2.7.0, and my SDK is v2.6.1

program log output:
program.log

nrfjprog -f NRF52 -r --log output:

nrf52.log

Parents
  • I have figured out the problem is not with the hardware or with JLink itself but seems to be with the SDK. When using the flashing option provided through the SDK in VSCode, I encounter the issue described in the post. However, when I use JLink through the command line I can flash the board without failure.

    So I have found a way to flash the board, but to any Nordic Engineer reading this there is an error with the flash functionality in the SDK. I have uninstalled and reinstalled the SDK and toolchain multiple times and the issue did not go away. 

Reply
  • I have figured out the problem is not with the hardware or with JLink itself but seems to be with the SDK. When using the flashing option provided through the SDK in VSCode, I encounter the issue described in the post. However, when I use JLink through the command line I can flash the board without failure.

    So I have found a way to flash the board, but to any Nordic Engineer reading this there is an error with the flash functionality in the SDK. I have uninstalled and reinstalled the SDK and toolchain multiple times and the issue did not go away. 

Children
  • For any future reader who encounters this issue and is wondering how they can do what I am doing, 

    Use the SDK in VSCode to build your application. 

    In a command prompt connect to your dev kit using JLink CLI (I have a nrf52840dk)

        JLink.exe -device nRF52840_xxAA -if SWD -speed 4000 -autoconnect 1

    In the J-Link console flash the generated hex file to your board (Mine is located under build\zephyr\zephyr.hex):

        C:\ {YOUR PATH TO PROJECT}\build\zephyr\zephyr.hex

    Reset the board and run the new firmware

        r

       go

  • Hi,

    I'm sorry for the late feedback.

    Do you get any error when you try to flash the board from VS code, can you share the log output?

    Can you also specify whether you used Toolchain manger or installed the SDK manually?

    regards

    Jared 

Related