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.