Programming two MCUs via SWD, per board
We have a board that has two different MCUs that need to be programmed using SWD; a PSoC6 and an STM32G4. Has anyone done this before using a PLT? I don't see that the SWD signals can be multiplexed to different pins through the switchboard. Just wondering if anyone has a suggested way for accomplishing this.
Could we perhaps add a MUX to our PPC, so that the SWD signals can be directed to the two MCUs, one at a time? Or, is there a way to turn the dedicated JTAG interface on the PLT into a 2nd SWD interface?
-
There are a couple of ways to achieve this.
One option would be to include switching on your PPC that allows the PLT to choose which MCU the SWD lines are connected to.
Another option would be to use a ST-Link programmer with the STM32G4, and the PLTs built-in SWD interface with the PSoC6.
-
Ted Kuhn We've added some more capabilities to PLT-OS to address this issue.
The PLTs built-in SWD interface is provided by an onboard FTDI GPIO/UART adapter. In PLT-OS 1.9.10, it is now possible to target a FTDI module or chip that's connected externally via USB. By including a FTDI module (FT4232H-56Q MINI MDL) on the PPC, more SWD, JTAG, or UART instances can be added as needed.
As part of this, the new release also allows the "interface" on a specific adapter to be specified. This is required for adapters like the FTDI FT4232 which have more than 1 channel. This allows you to use the "JTAG" interface on PLT-300 as a second SWD.
Here's what the command to use the JTAG interface as SWD would look like:
- command: program STM32G4 firmware.hex
interface: "2"Note that you would also need to put a 470Ohm resistor between the JTAG TDI and TDO pins, to turn them into SWDIO, as seen in this example of how the FTDI SWD interface works:
Please sign in to leave a comment.
Comments
2 comments