ERROR: JLinkARM DLL reported an error and An unknown error

Dear Nordic devs and members, 

First off, I appreciate all of the responses, and thank you for taking your time to resolve this issue,

Problem : 

My main issue with the nRF52832 board is "ERROR: JLinkARM DLL reported an error." when I ran the following command ".\nrfutil.exe device recover". 

PS C:\Users\shank\Downloads> .\nrfutil.exe device recover
x Failed to recover 682743246, [jlink] JLINKARM_DLL_ERROR
Error: One or more recover tasks failed


When I run this command as shown below, I have a similar error to 'Recovery Failed. Unknown error' nRF52 DK - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)

PS C:\Users\shank\Downloads> nrfjprog -f NRF52 --recover --log
Recovering device. This operation might take 30s.
[error] [ Client] - Encountered error -21: Command recover executed for 156 milliseconds with result -21
[error] [ Worker] - An unknown error.
ERROR: Recover failed. Please make sure that the correct device family is given
ERROR: and try again.

When I try to flash the program, this is my error as shown below, 

[error] [ Client] - Encountered error -102: Command read_device_info executed for 154 milliseconds with result -102
[error] [ Worker] - An unknown error.
[error] [ Client] - Encountered error -102: Command read_memory_descriptors executed for 43 milliseconds with result -102
Failed to read device memories.
[error] [ Worker] - An unknown error.
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated 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 33: nrfjprog --program 'c:\Users\shank\Desktop\blinky\build\zephyr\zephyr.hex' --sectoranduicrerase --verify -f NRF52 --snr 682743246

Temporary Solution:

I am facing a similar issue from this link from 5 years ago, 'Recovery Failed. Unknown error' nRF52 DK - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com). I was able to fix the issue by placing a jumper wire as shown in the below image. However, this solution doesn't work if I use in conjunction with PPK1. Also, this solution is very finnicky at times, it becomes very frustrating to work with.

My setup : 

What I have tried:

I tried to install and reinstall bootloader multiple times, 

  • tried to reinstall and install J link driver software multiple times,
  • completed this sequence below from how to reset jlink firmware - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com) successfully,

    "Could you try this sequence? 

    Power off the kit. Hold down the "IF boot / reset" button, then power on the kit.

    A mass-storage drive with the name "BOOTLOADER" should come up. 

    Download https://www.nordicsemi.com/-/media/Software-and-other-downloads/Dev-Kits/nRF5x-DK-files/J-Link-OB-SAM3U128-V2-NordicSemi-170724.bin and place this in the drive.

    Wait 10 seconds after successful copy.

    Power cycle the board and run JLinkExe from terminal (updates to a newer J-Link OB fw). PS: Named JLink Commander on Windows.

    Kind regards,

    Håkon"

  • switched multiple USB cables, ports.
  • Screenshot from Device Manager, 
  • Output from J-link commander
    • SEGGER J-Link Commander V7.94f (Compiled Jan 17 2024 15:36:28)
      DLL version V7.94f, compiled Jan 17 2024 15:35:18
      
      Connecting to J-Link via USB...O.K.
      Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Oct 30 2023 12:12:17
      Hardware version: V1.00
      J-Link uptime (since boot): 0d 00h 39m 25s
      S/N: 682743246
      License(s): RDI, FlashBP, FlashDL, JFlash, GDB
      USB speed mode: High speed (480 MBit/s)
      VTref=3.300V
      
      
      Type "connect" to establish a target connection, '?' for help
      J-Link>connect
      Please specify device / core. <Default>: NRF52
      Type '?' for selection dialog
      Device>
      Please specify target interface:
      J) JTAG (Default)
      S) SWD
      T) cJTAG
      TIF>
      Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
      JTAGConf>
      Specify target interface speed [kHz]. <Default>: 4000 kHz
      Speed>
      Device "NRF52" selected.
      
      
      Connecting to target via JTAG
      InitTarget() start
      InitTarget() end - Took 3.27ms
      TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
      Failed to identify target. Resetting via Reset pin and trying again.
      RESET (pin 15) high, but should be low. Please check target hardware.
      InitTarget() start
      InitTarget() end - Took 2.16ms
      TotalIRLen = ?, IRPrint = 0x..000000000000000000000000
      Cannot connect to target.
      J-Link>

  • Screenshot from J link Configurator
    •  ..
  • ssevice

Some More Information:


Hi devs, I will be glad to share more information, please let me know what info you need. I am using all the tools and software, latest software version. I have read many Nordic posts and pulling an all-nighter to fix this issue. I am an Electrical Engineering student from the National University of Singapore. I am using an nRF528232 for my Final Year Project :)

I will give some information regarding my setup by answering some of your questions from this link, 'Recovery Failed. Unknown error' nRF52 DK - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com).

0. Development Environment

  • Windows 11, 64 bit, OS Build : 22621.3007
  • VSCode as recommended by official nRF52 tutorial
  • nrfjprog version : nrfjprog version: 10.23.4 external
    JLinkARM.dll version: 7.94f
  • nrfutil version - nrfutil 7.6.0 (92ce3a0 2023-08-15)
    commit-hash: 92ce3a0c1cc7e203326d85919d826009510dc631
    commit-date: 2023-08-15
    host: x86_64-pc-windows-msvc
    build-timestamp: 2023-08-23T08:25:25.3155777Z
    classification: nrf-external
  • nRF SDK version : v2.5.0
  • Latest bootloader version : j-link-ob-sam3u128-v2-nordicsemi-170724, downloaded from Nordic website
  • ??? What more should I put in? 

1. Make sure that you have nRF5x Command Line Tools installed (White check mark)

2. Have you made sure that you are using the latest J-Link driver version? https://www.segger.com/downloads/jlink , I downloaded the latest version. (White check mark)

(you can check your version with going to "cmd" and use the command "nrfjprog -v")

3. Does the device show up in Device Manager on your computer? Please try to connect and disconnect the kit a few times. It might show up with unexpected names. (Yes, the device shows in the Device ManagerWhite check mark)

4. Have you tried a different USB cable? Faulty cables are surprisingly often the problem. (White check mark)

5. Have you tried using a different computer? If it works on a different computer we know that the kit is not broken and that it is probably a driver issue. (X, I haven't tested it yet, don't have another laptop) 

6. Have you tried to press the IF BOOT/RESET button while power cycling the kit? It should then show up as a Removable Storage Device named "BOOTLOADER". Then you can drag-and-drop the J-LINK interface MCU firmware found here (v170724) onto the storage device to reprogram the JLINK firmware. (White check mark)

7. Have you measured the supply voltage on the kit? It should be somewhere between 2.8V-3.3V. If it isn't, then the hardware is probably broken. (Yes, it shows 3.3V White check mark)

8. Try to open "j-link configurator" and see if your board is recognized there. (Yes, my board is recognized)

 If nothing works, run the cmd "nrfjprog.exe --recover --log" and post the log here.

PS C:\Users\shank> nrfjprog.exe --recover --log
[error] [ Client] - Encountered error -102: Command connect_to_emu_with_snr executed for 218 milliseconds with result -102
ERROR: Unable to connect to a debugger.
[error] [ Worker] - An unknown error.
ERROR: JLinkARM DLL reported an error. Try again. If error condition
ERROR: persists, run the same command again with argument --log, contact Nordic
ERROR: Semiconductor and provide the generated log.log file to them.

Parents
  • Hi,

    Do you have the Solder bridge SB9 cut?

      (Looks like this image is from the other post but I dont see a jumper on P22 on your image)

    This is from your DK

    I dont see any sticker on this DK, what version of the DK do you have?



    From this image it looks like the jumper for power is not on correctly, if the SB9 is cut. 


    AS for the unfortunate placment of the jumper cable, there are other places to connect to VDD

    You can route a cable on the underside of the DK to not take up space and block the PPK1


    Regards,
    Jonathan

  • Dear Jonathan, thank you for your response. I really appreciate it :))

    Do you have the Solder bridge SB9 cut?

    Image 1 : Closeup of the SB9

    After closely examining the microcontroller, i observed that the SB9 solder bridge has been cut.

    I dont see any sticker on this DK, what version of the DK do you have?

    I am using nRF52832 DK. Unfortunately, I don't have the sticker since I received the nRF52 microcontroller from my professor. 

    Solution: 

    Image 2 : Jumper cable shorted to pin PIN22

    I used a jumper cable to short the pin P22.

    Image 3 : LED2 lit on the PPK1

    As seen from the above image, the LED2 is lit on the PPK1, an indication that the PPK1 is working and the nRF52832 is working well. 

    I placed a jumped cable on P22 since the solder bridge SB9 is cut. After placing my PPK1, the nRFConnect application automatically updated the firmware of PPK1 and it has been working well since then. 

    Thank you, Mr., Jonathan LL for your help, really appreciate the quick response 

    Best Regards,

    - The C Advocate

Reply
  • Dear Jonathan, thank you for your response. I really appreciate it :))

    Do you have the Solder bridge SB9 cut?

    Image 1 : Closeup of the SB9

    After closely examining the microcontroller, i observed that the SB9 solder bridge has been cut.

    I dont see any sticker on this DK, what version of the DK do you have?

    I am using nRF52832 DK. Unfortunately, I don't have the sticker since I received the nRF52 microcontroller from my professor. 

    Solution: 

    Image 2 : Jumper cable shorted to pin PIN22

    I used a jumper cable to short the pin P22.

    Image 3 : LED2 lit on the PPK1

    As seen from the above image, the LED2 is lit on the PPK1, an indication that the PPK1 is working and the nRF52832 is working well. 

    I placed a jumped cable on P22 since the solder bridge SB9 is cut. After placing my PPK1, the nRFConnect application automatically updated the firmware of PPK1 and it has been working well since then. 

    Thank you, Mr., Jonathan LL for your help, really appreciate the quick response 

    Best Regards,

    - The C Advocate

Children
No Data
Related