This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Feature: tri-state SWDIO, SWCLK on unbuffered platforms#1945
Merged
Conversation
dragonmux
suggested changes
Oct 2, 2024
Member
dragonmux
left a comment
There was a problem hiding this comment.
Functionally LGTM, there's just one item to do with a comment which once sorted we can then merge this.
c07eeff to
27cbec7
Compare
dragonmux
approved these changes
Oct 2, 2024
Member
dragonmux
left a comment
There was a problem hiding this comment.
LGTM, merging. Thank you for the contribution!
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detailed description
nativeFeature: high-z TCK/SWCLK when idle #1192 applied to other platforms.nativeuses.Tested on stlink/v3e of Nucleo-144 to give up the lines and allow using another external debugger. If SWDIO_MODE_DRIVE/SWDIO_MODE_FLOAT of swdptap.c and TMS_SET_MODE of jtagtap.c macros worked correctly, then I'd only need to touch the TCK gpio, but it was not enough. It may have to do with the sequence of swd writes (BMP is expected to write the next command and can't know it should idle).
The bonus change increases the slowest 2MHz slew rate on f723 to at least 25 MHz, because I've seen it bitbang faster than 10 MHz, and the waveform is degraded. Also CFLAGS="-Og" slow the swdptap.c routines down compared to "-Os" of other platforms, I'd like to update that as well (considering most stlinkv3's are in RDP2 anyways).
The same patch should be adapted and applied to blackpills and swlink, likely others (f072, f3, f4discovery, etc.)
I can't assume what pull-ups or pull-downs will be present on target's SWJ-DP (SW-DP), e.g. STM32 uses a TCK pull-down but RP2040 uses pull-ups on both TCK and TMS. So I just float the (normally driven) pins.
Your checklist for this pull request
Closing issues
Fixes #1868 point 3.