Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Serial Wire Debug (SWD) using USBIO pins in PSoC® 3 and PSoC 5LP

Serial Wire Debug (SWD) using USBIO pins in PSoC® 3 and PSoC 5LP

VivekK_11
Employee
Employee
Welcome! First solution authored 10 replies posted

SWD interface using USBIO pins

 

The SWD interface in PSoC® 3 and PSoC 5LP uses two pins for programming/debug:

  •   JTAG pins as SWD pins: TMS (P1[0]) as SWDIO, TCK (P1[1]) as SWDCK
  •   USB pins as SWD pins: USB D+ (P15[6]) as SWDIO, USB D- (P15[7]) as SWDCK

The USBIO pins are useful for in-system programming of USB solutions that would otherwise require a separate programming connector:

- One pin is used for the data clock (SWDCK);

- Other is used for data input and output (SWDIO).

SWD can be enabled on only one of the pin pairs at a time. No setting needs to be made in PSoC Creator™ for this. Once the device comes out of reset, the Test Controller block in PSoC monitors for SWD clock transitions on both of the SWDCK port pins (TCK, USB D-). It will select the SWD pair on which it detects a clock transition and use that pair of pins for further programming and debug operations.

MiniProg3 and SWD 

 

The target device can be powered externally or by the MiniProg3 itself. When the target device needs to be powered by the MiniProg3, the VTARG pin of MiniProg3 should be connected to the appropriate power supply pins (VDDIOx, VDDA, VDDD). The maximum current sourcing capability of the MiniProg3 is limited to approximately 200 mA. When the target device is powered externally, the MiniProg3 needs to know the voltage levels at which the I/O pins should be driven. In this case, as the USB pins are used for SWD programming, the VDDD supply voltage must be connected to the VTARG pin of the MiniProg3 connector because the USB pins are powered by the VDDD pin. This is shown in Figure 1.

Figure 1. Using USB Pins for SWD Interface for PSoC 5 LP

USB Pins

More information about SWD for PSoC devices can be found in the PSoC 3 Device Programming Specifications and the PSoC 5LP Device Programming Specifications.

 

Translation - Japanese:  PSoC® 3 および PSoC 5LP のUSBIOピンを使用したシリアルワイヤデバッグ(SWD)– KBA82881 - Community Translated (JA)

0 Likes
3632 Views