Not possible to access nRF52840 vi J-LINK after downloading "peripheral Uart" example

Dear sir/madame

I am teaching myself in using Connect SDK(NCS) version 2.4.2 and nRF Connect for Desktop v4.2.1

I have never used VS code and I am following Nordic hands-on courses.

I am now able to create a new project and then I mowed forward and loaded the Nordic example "peripheral Uart".

I built the project and then downloaded it to nRF52840, (customer board).

The code was not running as expected and I was not able to debug.

I made some changes in the code and tried to download it again but was not able.

I made a lot of googling without any major success, but ended up with running the following commands using nrf-utilities:

  • >nrfjprog --eraseall –log
  • >nrfjprog --recover –log

Even after running these commands, I am not able to access nRF52840 any longer.

The log is attached below.

So, my question: What should I do now?

Kind regards

Svein

 

 

ERROR LOG

=================================================================

 *  Executing task: nRF Connect: Flash: peripheral_uart/build (active)

Flashing build to 801033832

C:\windows\system32\cmd.exe /d /s /c "west flash -d c:\ncs\v2.4.2\nrf\samples\bluetooth\peripheral_uart\build --skip-rebuild --dev-id 801033832 --erase"

-- west flash: using runner nrfjprog

-- runners.nrfjprog: mass erase requested

-- runners.nrfjprog: Flashing file: c:\ncs\v2.4.2\nrf\samples\bluetooth\peripheral_uart\build\zephyr\zephyr.hex

[error] [ Worker] - 10 second timeout elapsed, no time left to wait for debug port to power up.

[error] [ Client] - Encountered error -220: Command read_device_info executed for 10010 milliseconds with result -220

[error] [ Client] - Encountered error -220: Command read_memory_descriptors executed for 10010 milliseconds with result -220

Failed to read device memories.

[error] [ Worker] - 10 second timeout elapsed, no time left to wait for debug port to power up.

ERROR: Operation failed due to timeout. Check the log messages for more details.

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 64: nrfjprog --program 'c:\ncs\v2.4.2\nrf\samples\bluetooth\peripheral_uart\build\zephyr\zephyr.hex' --chiperase --verify -f NRF52 --snr 801033832

*  The terminal process terminated with exit code: 64.

 *  Terminal will be reused by tasks, press any key to close it.

 

 

Then I ran the command “nrfjprog –eraseall –log and got the following error message:

\nRF-Util>nrfjprog --eraseall --log

[error] [ Client] - Encountered error -220: Command read_device_info executed for 10005 milliseconds with result -220

[error] [ Worker] - 10 second timeout elapsed, no time left to wait for debug port to power up.

[error] [ Client] - Encountered error -220: Command read_memory_descriptors executed for 10006 milliseconds with result -220

Failed to read device memories.

[error] [ Worker] - 10 second timeout elapsed, no time left to wait for debug port to power up.

ERROR: Operation failed due to timeout. Check the log messages for more details.

 

I tried to run “recover”, but no success.

\nRF-Util>nrfjprog --recover --log

Recovering device. This operation might take 30s.

[error] [ Client] - Encountered error -21: Command recover executed for 10009 milliseconds with result -21

[error] [ Worker] - 10 second timeout elapsed, no time left to wait for debug port to power up.

ERROR: Recover failed. Please make sure that the correct device family is given

ERROR: and try again.

Parents
  • Dear Svein,

    I'm sorry to hear about the issues you're facing with your nRF52840 and the "peripheral Uart" example. It can be frustrating when things don't go as expected. Let's try to troubleshoot this together.

    First, it's great to see your enthusiasm for learning and experimenting with Connect SDK and nRF Connect for Desktop. Here are some steps you can take to resolve the situation:

    1. Check Connections: Double-check your hardware connections, ensuring that your nRF52840 is properly connected to your computer via the J-Link.

    2. Verify Code Changes: Revert the code changes you made to the "peripheral Uart" example back to the original state to eliminate any code-related issues. Ensure that the unmodified example runs as expected.

    3. VS Code Configuration: Make sure you have properly configured VS Code for use with your nRF52840. Check the build and debug configurations to ensure they are set up correctly.

    4. J-Link Driver: Ensure that your J-Link driver is up to date. You can download the latest driver from the SEGGER website.

    5. Try a Different USB Port or Cable: Sometimes, connectivity issues can be caused by faulty USB ports or cables. Try a different USB port or cable to rule out this possibility.

    6. Reinstall SDK and Tools: If all else fails, consider reinstalling Connect SDK, nRF Connect for Desktop, and nRF-utilities to ensure that you have a clean and properly functioning development environment.

    7. Seek Help from the Nordic Community: You're not alone in your journey. The Nordic Developer Zone and forums can be a valuable resource for troubleshooting issues and seeking help from experienced developers.

    If you're still facing problems after trying these steps, don't hesitate to reach out to the Nordic support team. They have a wealth of experience and can provide specific guidance based on your setup and issue.

    I hope this helps you get back on track with your project. Don't hesitate to ask for further assistance if needed. Keep up the great work in your learning journey!

    Best regards,

Reply
  • Dear Svein,

    I'm sorry to hear about the issues you're facing with your nRF52840 and the "peripheral Uart" example. It can be frustrating when things don't go as expected. Let's try to troubleshoot this together.

    First, it's great to see your enthusiasm for learning and experimenting with Connect SDK and nRF Connect for Desktop. Here are some steps you can take to resolve the situation:

    1. Check Connections: Double-check your hardware connections, ensuring that your nRF52840 is properly connected to your computer via the J-Link.

    2. Verify Code Changes: Revert the code changes you made to the "peripheral Uart" example back to the original state to eliminate any code-related issues. Ensure that the unmodified example runs as expected.

    3. VS Code Configuration: Make sure you have properly configured VS Code for use with your nRF52840. Check the build and debug configurations to ensure they are set up correctly.

    4. J-Link Driver: Ensure that your J-Link driver is up to date. You can download the latest driver from the SEGGER website.

    5. Try a Different USB Port or Cable: Sometimes, connectivity issues can be caused by faulty USB ports or cables. Try a different USB port or cable to rule out this possibility.

    6. Reinstall SDK and Tools: If all else fails, consider reinstalling Connect SDK, nRF Connect for Desktop, and nRF-utilities to ensure that you have a clean and properly functioning development environment.

    7. Seek Help from the Nordic Community: You're not alone in your journey. The Nordic Developer Zone and forums can be a valuable resource for troubleshooting issues and seeking help from experienced developers.

    If you're still facing problems after trying these steps, don't hesitate to reach out to the Nordic support team. They have a wealth of experience and can provide specific guidance based on your setup and issue.

    I hope this helps you get back on track with your project. Don't hesitate to ask for further assistance if needed. Keep up the great work in your learning journey!

    Best regards,

Children
No Data
Related