Problems with: Programming custom board with nRF5340 MCU by nRF5340 DK via P20 and nRF Connect for VS Code

Hello, I have a custom board with nRF5340 MCU. I'm a hardware engineer and we have firmware engineers for programming it.

Trying to connect and erase/reboot my custom board through nRF5340 DK with VS Code and nRF Connect says: Error resetting device. See the Output tabs for more details.

Problems:

Output tab is always emtpy. What should I see there?

Why I can't connect to my custom board? Our programmers can easily connect to our boards with J-Link Segger.

My board's VDD is 1.8V.

I connet P20.2 with P20.3 so VTG and VDD nRF' are connected.

P20.4 (SWD IO) goes to SWDIO on my board.

P20.5 (SWD CLK) goes to SWD CLK on my board.

P20.7 (RESET) goes to nRESET on my board.

P20.12 (VIO REF) goes to VDD on my board to detect my VDD and make its own VDD the same (1.8V)

I press erase/restart in VS Code and get error that is described above. I can even see that on my test points of my boards on SWD CLK and IO there are some activity with right voltage level (1.8V). But my target MCU is not answering. What can be a problem? J-Link Seger works well.

Parents
  • No Reply button again.

    The nRF53 should have no issues being programmed at 3V
    -In Absolute maximum ratings it says that I/O pin voltage Max. is VDD+0.3V so If I power nRF with 1.8 this Max is 2.1. How can it be normal as you say that nRF should have no issues? We have sent our PCBs to X-ray and it says that it is soldered well. So, can it be that some of this pins are already burned with this 3V according to Absolute maximum ratings?

    J-Link Seger works well
    -If we use J-Link and connect it's SWDIO, SWDCLK, VDD and GND to my PCBs to the same pins where I connect nRF Devkit for programming it programs nRF without any hassle.

    You can use the nrfjprog tool and add --log to enable logging, this will make a log.log file that we can look at.
    -Is that possible to do that from Visual Studio as I do that from Visual Studio with your tools for that? Or could you please give me a link to the instruction on how to do that under windows as I can't as for a help from our programme as he's doing that under MacOS and I rarely see him this days.

  • elektron314 said:
    We have sent our PCBs to X-ray and it says that it is soldered well. So, can it be that some of this pins are already burned with this 3V according to Absolute maximum ratings

    unlikely, but can never say never. So there should in general not be a issue supplying a voltage that is a higher, but still within the operating limit. Is the device no longer working?

    For shorter periods of time leaving the battery attached or other source and then connecting the debugger with a higher voltage should not pose a problem. You said that using the 10 pin debug out P19 connector works as expected and no issues. So it is only the P20 that does not behave as it should.


    For production then the voltage on the SWD lines should not exceed VDD+0.3V. 

    elektron314 said:
    So, can it be that some of this pins are already burned with this 3V according to Absolute maximum ratings?

    Its max rating for I/O pins. 

    elektron314 said:
    Is that possible to do that from Visual Studio as I do that from Visual Studio with your tools for that?

    If you get the terminal open then you can write directly in the terminal in VS code. Here I just wrote nrfjprog -e --log and you see it completed with no errors. 


    The "-e" is the erase function. 

    The file should show up as a log.log in the folder you ran the command. So for me in this instance it can be found in C:\NCS\Custom-user-test-apps\hello_world. 





    elektron314 said:
    -If we use J-Link and connect it's SWDIO, SWDCLK, VDD and GND to my PCBs to the same pins where I connect nRF Devkit for programming it programs nRF without any hassle.

    So its with an external debugger\programmer. I misunderstood that part. 


    Try to ground the SWO pin on Pin on P20, its used in P19 as a detect and it is one of the changes done from our older designs. Still compatible with JTAG standard. 


    Regards,
    Jonathan

Reply
  • elektron314 said:
    We have sent our PCBs to X-ray and it says that it is soldered well. So, can it be that some of this pins are already burned with this 3V according to Absolute maximum ratings

    unlikely, but can never say never. So there should in general not be a issue supplying a voltage that is a higher, but still within the operating limit. Is the device no longer working?

    For shorter periods of time leaving the battery attached or other source and then connecting the debugger with a higher voltage should not pose a problem. You said that using the 10 pin debug out P19 connector works as expected and no issues. So it is only the P20 that does not behave as it should.


    For production then the voltage on the SWD lines should not exceed VDD+0.3V. 

    elektron314 said:
    So, can it be that some of this pins are already burned with this 3V according to Absolute maximum ratings?

    Its max rating for I/O pins. 

    elektron314 said:
    Is that possible to do that from Visual Studio as I do that from Visual Studio with your tools for that?

    If you get the terminal open then you can write directly in the terminal in VS code. Here I just wrote nrfjprog -e --log and you see it completed with no errors. 


    The "-e" is the erase function. 

    The file should show up as a log.log in the folder you ran the command. So for me in this instance it can be found in C:\NCS\Custom-user-test-apps\hello_world. 





    elektron314 said:
    -If we use J-Link and connect it's SWDIO, SWDCLK, VDD and GND to my PCBs to the same pins where I connect nRF Devkit for programming it programs nRF without any hassle.

    So its with an external debugger\programmer. I misunderstood that part. 


    Try to ground the SWO pin on Pin on P20, its used in P19 as a detect and it is one of the changes done from our older designs. Still compatible with JTAG standard. 


    Regards,
    Jonathan

Children
Related