Skip to main content
Visitor II
November 6, 2024
Question

Switch JTAG to SWD port on STM32L4

  • November 6, 2024
  • 2 replies
  • 926 views

Hi,

I'm working on an STM32L4R5ZIT6 mcu and I'm facing with the problem of switching the JTAG port to SWD without the use of a debugger (ST-Link or similar); reading the "Arm Debug Interface" document I found the way to make the switch and in fact, using a NUCLEO board (with an STM32F411RE) I realized a system to change the port using only the SWDIO and SWCK pins of L4. My goal is to use the SWO pin as a debug tx pin and to do this the first step is to switch the port from JTAG to SWD; now I'd like to know if it's possible to get this switching from inside L4 (and not using an external device) working on its ARM registers, because I'd like to realize this at the start-up of my code. Please could anyone has any idea to solve my problem?

Regards

 

    This topic has been closed for replies.

    2 replies

    Super User
    November 6, 2024

    Not sure what's the point here?

    If you're going to use SWO, then you'll need an SWD debug probe for that anyhow?

    DUrbanoAuthor
    Visitor II
    November 6, 2024

    Not only an SWD debug probe...you can link swo pin to a USB/TTL converter and it works perfectly as a normal serial. But the problem is to get available this pin, and to do this the only way is to switch the port from JTAG to SWD...