Hello,
I want to program and debug a custom board using my nRF52840 DK (PCA10056 v3.0.3) as the programmer, through the Debug out connector P19. Before I order the cable, I would like to confirm a few things.
Setup
- Programmer: nRF52840 DK v3.0.3, powered from USB. SB47 and SB19 are open (default).
- Target: custom board with a Raytac MDBT50Q-1MV2 module (nRF52840), powered from its own primary lithium battery (Saft LS14250, 3.6 V) through a 3.3 V LDO (TPS7A0233). VDD and VDDH are both tied to this 3.3 V rail, so the target runs at 3.3 V.
- Target debug connector: Tag-Connect TC2030-IDC-NL footprint (6 pads), wired as: pin 1 = 3.3 V, pin 2 = SWDIO, pin 3 = nRESET (not connected), pin 4 = SWDCLK, pin 5 = GND, pin 6 = SWO (not connected). P0.18 is also not connected on the board.
- Planned cable: Tag-Connect TC2030-CTX-NL (6-pin Tag-Connect end, 10-pin Cortex Debug connector). According to the Tag-Connect TC2030-CTX datasheet, the 10-pin end is: 1 VCC, 2 SWDIO, 3 GND, 4 SWCLK, 5 GND, 6 SWO, 9 GNDDetect, 10 nRESET.
- The module is blank (no bootloader, APPROTECT not enabled).
Questions
- The DK User Guide (section 4.10) says the external board voltage must match the DK voltage, and that the DK voltage is 3 V when powered through USB. My target runs at 3.3 V. Is this 0.3 V difference acceptable for SWD programming and debugging with the on-board J-Link OB? If not, what is the recommended way to match the voltages (for example powering the target from the DK, or setting the DK VDD)?
- In v3.0.3, the guide says the interface MCU programs the external target when P19 pin 3 (SWD0_SELECT) is connected to GND. With the TC2030-CTX-NL cable, pin 3 of the 10-pin connector is GND according to Tag-Connect. Is this a correct and supported way to select the external target? Is the voltage on P19 pin 1 (SWD0_VTG) used as a reference for the SWD signal levels, or only for detecting the target?
- My target has nRESET not connected. Is it enough to connect VTG, SWDIO, SWDCLK and GND to program, debug, and recover the chip (for example with
nrfjprog --recoveror nRF Connect Programmer)? Are there any limitations when pin reset is not available on P19 pin 10? - With SB47 open, and the target powered by its own battery while P19 pin 1 is connected to the target 3.3 V rail: is there any risk of current flowing back into the DK or any damage? Should I disconnect pin 1 (VTG) from the target rail in this case?
Thank you for your help.
Best regards,
Mario