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

J-Link Programming external nRF52 : Failed to connect to target, no Idcode detected

Hi,

I'm currently programming a custom board using a nRF52832 (using this wiring). Everything was working great but I tried to play with SAADC and maybe did a wrong configuration and/or added too much debug log. Since a previous code upload, I'm unable to connect to my board again.

I had another board with the same behavior (same code uploaded to confirm this was the code), but somehow I found a way to unlock it, I was able to upload a basic blinky example while removing the GND DETECT and switch from VDD to VDD nRF. I don't know if it related though.

But I still have one board completely locked, how to unlock it ?

> JLinkExe -device NRF52 -if SWD -speed 1518 -autoconnect 1

SEGGER J-Link Commander V6.22a (Compiled Nov 28 2017 17:57:01)
DLL version V6.22a, compiled Nov 28 2017 17:56:49

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jul 24 2017 17:30:12
Hardware version: V1.00
S/N: 682621274
VTref = 3.300V
Device "NRF52" selected.


Connecting to target via SWD
Cannot connect to target.
J-Link>

Thanks

Parents
  • Hi,

     

    Since it detects 3.3V, it looks like you have the wiring setup correctly.

    Have you tried using nrfjprog to recover the device, like this: "nrfjprog --recover -f nrf52"?

    The current consumed by your custom board can also be a good indicator if there's something wrong. Have you checked this?

    Cheers,

    Håkon

  • Hi Håkon,

    Did you had the time to check my previous reply ? I'm still not able to find a solution by myself :/ 

    Thanks for your support

  • If it works on the other board, powered at 2.1V, then you are barely hitting the required voltage for a registered logic '1' (0.7*VDD).

    It's no problem to measure current when the USB is connected, it is just that you will get more noise on your measurement if you're measuring in the micro-amp area.

    You must have the same VDD level on the custom board as the DK, as there is no level shifters or similar in between your board and the DK. Connect "VDD_NRF" from the DK to the '+' of your battery terminal (remove battery first) and the same applies for the GND connection.

    If you follow the schematic in this thread, you effectively power your custom board from the DK to ensure that VDD_CustomBoard == VDD_NRF.

    Best regards,

    Håkon

  • Hi ,

    First I removed the battery soldered on my Custom Board (aka CB). Here are some measurements I've made with my amp meter on the broken CB :

    • DK VDD_NRF  -->  CB '+' = 0.280V (unsteady, keeps dropping few mV every second)
    • DK GND  -->  CB '+' = 1.1V (unsteady, keeps dropping few mV every second)
    • DK VDD_NRF  -->  CB GND = 0.797V (steady)
    • CB '+'  -->  CB GND = 1.1V (unsteady, keeps dropping few mV every second)

    And here are the same measurement on my working CB which I can program normally using JLINK :

    • DK VDD_NRF  -->  CB '+' = 0.280V (unsteady, keeps dropping few mV every second)
    • DK GND  -->  CB '+' = 0.5V (unsteady, keeps dropping few mV every second)
    • DK VDD_NRF  -->  CB GND = 0.806V (steady)
    • CB '+'  -->  CB GND = 0.5V (unsteady, keeps dropping few mV every second)

    I don' really understand.

    Is it because on the working board 0.806V - 0.280V ~= 0.5V   while on the broken board 0.797V - 0.280V /= 1.1V ?

  • Judging from your results, the neither the VDD or the GND is connected between the CB and the DK. If GND was connected together, you should see ~0V when measuring GND on both boards. Check for loose connections!

    You need to connect atleast DK_GND and CB_GND together, and preferably the DK_VDD and CB_VDD (remember to take out the battery if you connect the two VDDs together!)

    Best regards,

    Håkon

     

  • Thanks for your support... It's not an easy one.

    For me it is connected, the wiring is not the problem, the board was working before. GND are connected together, same for CDD.

    In my opinion it's either a sotfware infinite loop that is blocking the communication or a component who broke, but you are the expert here.

    I've checked the current :

    • On my DK, from GND to VDD I got 2.81V
    • On my working CB from GND to VDD going to the nRF52832 : 2.81V
    • On my broken CB from GND to VDD going to the nRF52832 : 2.78V

    Could this difference of 3mV can cause the problem ?

    Thanks for your help

  • Voltages looks fine now. 3mV difference should not have any effect.

    If your board is stuck in a assert-loop (RESET-loop) early in the firmware, could have issues recovering the board. You could try to make a script that loops over the shell-call "nrfjprog -e" or "nrfjprog --recover" to try to recover it, or try on different computers (windows based) to see if that helps.

     

    Best regards,

    Håkon

Reply
  • Voltages looks fine now. 3mV difference should not have any effect.

    If your board is stuck in a assert-loop (RESET-loop) early in the firmware, could have issues recovering the board. You could try to make a script that loops over the shell-call "nrfjprog -e" or "nrfjprog --recover" to try to recover it, or try on different computers (windows based) to see if that helps.

     

    Best regards,

    Håkon

Children
No Data
Related