Skip to content

Fix SWD, output couldn't be disabled in dedic_gpio (EUB-98)#40

Open
viric wants to merge 1 commit intoespressif:masterfrom
viric:fix-swd
Open

Fix SWD, output couldn't be disabled in dedic_gpio (EUB-98)#40
viric wants to merge 1 commit intoespressif:masterfrom
viric:fix-swd

Conversation

@viric
Copy link

@viric viric commented Dec 3, 2025

The SWDIO output was never disabled, and this caused all readings to be wrong. This seems related to ESP32-S2 and S3
SOC_DEDIC_GPIO_OUT_AUTO_ENABLE.

I change to use dedic_gpio only for input, and then I drive the output the usual gpio_ll_set_level way.

This makes openocd finally work for me; debugging an nrf52 target.

Description

Related

Testing


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Messages
📖 Good Job! All checks are passing!

👋 Welcome viric, thank you for your first contribution to espressif/esp-usb-bridge project!

📘 Please check project Contributions Guide of the project for the contribution checklist, information regarding code and documentation style, testing and other topics.

Pull request review and merge process you can expect

We do welcome contributions in the form of bug reports, feature requests and pull requests via this public GitHub repository.

  1. An internal issue has been created for the PR, we assign it to the relevant engineer
  2. They review the PR and either approve it or ask you for changes or clarifications
  3. Once the Github PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing
    • At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
  4. If the change is approved and passes the tests it is merged into the default branch

Generated by 🚫 dangerJS against d3221e6

@github-actions github-actions bot changed the title Fix SWD, output couldn't be disabled in dedic_gpio Fix SWD, output couldn't be disabled in dedic_gpio (EUB-98) Dec 3, 2025
@dobairoland dobairoland requested a review from erhankur December 8, 2025 08:51
@erhankur
Copy link
Collaborator

erhankur commented Dec 9, 2025

@viric Thank you for the fix and the PR. I’m a bit busy this week, but I’ll probably be able to review it next week.

The SWDIO output was never disabled, and this caused all readings to be
wrong. This seems related to ESP32-S2 and S3
SOC_DEDIC_GPIO_OUT_AUTO_ENABLE.

I change to use dedic_gpio only for input, and then I drive the output
the usual gpio_ll_set_level way.

This makes openocd finally work for me; debugging an nrf52 target.
@erhankur
Copy link
Collaborator

erhankur commented Jan 5, 2026

@viric which IDF release are you using to build the project? IDF v5.4 and later include some changes related to dedic_gpio, and we haven’t adapted to those yet. v5.3 should work without any changes. Could you please confirm this as a first step?

@viric
Copy link
Author

viric commented Jan 5, 2026

I was using ESP-IDF 5.5.1.

@erhankur
Copy link
Collaborator

erhankur commented Jan 6, 2026

Any chance to build & test with v5.3?

Then we can focus on the issue and find a common fix for all branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants