Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

Feature: high-z TCK/SWCLK when idle#1192

Merged
esden merged 38 commits into
mainfrom
feature/high-z-idle-swclk
Aug 16, 2022
Merged

Feature: high-z TCK/SWCLK when idle#1192
esden merged 38 commits into
mainfrom
feature/high-z-idle-swclk

Conversation

@dragonmux
Copy link
Copy Markdown
Member

@dragonmux dragonmux commented Aug 14, 2022

Detailed description

Certain low pin-count parts very heavily overload the device pins with functionality. This can mean it's inappropriate to drive TCK/SWCLK before initiating a scan, after scan but before attach, and after detach.

This PR introduces tristating support for these devices when running native hardware revision 6 and newer, allowing BMP to work around this problem. This also means BMP will play nicer with other devices on the roadmap.

This has been tested working against both the SWD and JTAG modes of the Tiva-C TM4C123GH6PM.

Your checklist for this pull request

  • I've read the Code of Conduct
  • I've read the guidelines for contributing to this repository
  • It builds for hardware native (make PROBE_HOST=native)
  • It builds as BMDA (make PROBE_HOST=hosted)
  • I've tested it to the best of my ability
  • My commit messages provide a useful short description of what the commits do

Closing issues

Fixes #945

@dragonmux dragonmux requested a review from esden August 14, 2022 17:24
@dragonmux dragonmux added this to the v1.9 release milestone Aug 14, 2022
@dragonmux dragonmux added Enhancement General project improvement HwIssue Mitigation Solving or mitigating a Hardware issue in Software labels Aug 14, 2022
@emeb
Copy link
Copy Markdown
Contributor

emeb commented Aug 15, 2022

I've tested this out with recent BMP hardware on an STM32G030J6 that needs to share its SWCLK pin with a UART TX signal. The Hi-Z feature on the BMP SWCLK signal allows the G030J6 to safely share the pin for both programing and functional operation without danger of contention which is confirmed by measuring the Voh/Vol levels prior / during / post flashing. Levels were observed to be fully 3.3V / 0V with no evidence of excessive current flow.

Copy link
Copy Markdown
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested on 1bitsy (STM32F415) and BMP V2.3 (GD32F103) all seems good so far. 🤞

@esden esden merged commit dde75f1 into main Aug 16, 2022
@dragonmux dragonmux deleted the feature/high-z-idle-swclk branch August 16, 2022 07:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement General project improvement HwIssue Mitigation Solving or mitigating a Hardware issue in Software

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set SWCLK and SWDIO to Hi-Z on detatch

3 participants