Skip to content

Conversation

@ALTracer
Copy link
Contributor

Detailed description

  • This is a minor new feature.
  • The problem is BMD logic expects to use jtagtap_cycle() sometimes, but BMDA hasn't always provided it.
  • This PR solves it by providing one moderately optimized implementation for FTDI MPSSE backend.

Tested on FT2232HL against a RISC-V MCU. Based on #2179. See #2180 for tracking other backends.
I would like some explanation, is buffering beneficial in the handlers, or does it exist externally (between two flush calls), then I can discard the 2nd commit.

Your checklist for this pull request

Closing issues

@dragonmux
Copy link
Member

Please rebase this PR on main and we'll get it reviewed.

@ALTracer ALTracer force-pushed the feature/jtagtap_cycle_ftdi branch from a1fe471 to 74a11ed Compare January 29, 2026 17:19
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

Couple of review notes, nothing too major though and with them addressed we'll be happy to merge this.

@ALTracer
Copy link
Contributor Author

ALTracer commented Jan 30, 2026

Your questions made me realize I've designed this with a logic bug, where it commands 0x8e 0xff when 8 clocks are requested; should be 0x8e 0x07 or 0x8f 0x00. Confirmed with a small throwaway unit test snippet.
upd: this might be as easy to fix as if (clock_bits >= 8) return;.

@ALTracer
Copy link
Contributor Author

@ALTracer ALTracer force-pushed the feature/jtagtap_cycle_ftdi branch from 4540bd5 to c4549be Compare January 30, 2026 18:56
@ALTracer ALTracer force-pushed the feature/jtagtap_cycle_ftdi branch from c4549be to e4ae916 Compare February 2, 2026 05:05
@ALTracer ALTracer force-pushed the feature/jtagtap_cycle_ftdi branch from e4ae916 to f9e0169 Compare February 2, 2026 05:19
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

LGTM, merging. Thank you for the contribution and this speed-up to the FTDI code for running cycles where TMS and TDI need to be kept constant

@dragonmux dragonmux merged commit f9e0169 into blackmagic-debug:main Feb 2, 2026
38 of 39 checks passed
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