Skip to content

Conversation

@ALTracer
Copy link
Contributor

Detailed description

  • This is a minor new feature.
  • The problem is rudimentary/poor implementation of jtagtap_cycle() in jlink.c backend used by BMDA. (and it didn't even exist until very recently)
  • This PR solves it by providing one moderately optimized variant.

Tracking: #2180.
Note that jlink_jtag_init() used to rely on a direct jlink_transfer() of a baked byte buffer with 56 idle clocks and SWD-to-JTAG switch sequence, I replaced that with a jlink_jtag_cycle() call for 56-5=51 clocks and a shorter, 16-bit sequence. The caveat is that new function may raise an exception, and at scan time it results in immediate SIGABRT because it's unhandled (by any TRY-CATCH up the callsite). It also happens to be the first 0xCF opcode transfer. If such behaviour is unwanted, discard commit 1.

Tested on J-Link V9 against a RISC-V MCU.

Your checklist for this pull request

Closing issues

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.

1 participant