This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Conversation
…, allowing much more correct retries and failure handling
…ong `dap_packet_size` calculated for adaptors with a 512 byte HID report length
…o `FT_Write()` (the function is not const-correct)
…t are outgoing using DAP_SWJ_Sequence
…perform_dap_transfer()`
…er to `perform_dap_transfer_swd_unchecked()`
…ver to `perform_dap_transfer_swd_unchecked()`
…s to return from the HID I/O calls and how many to copy into the output buffer
When a transaction is split (due to having the final TMS bit high), the value that is returned needs to be ORed into the final byte, rather than simply overwriting it. This enables the full upper byte to be reported to the caller. Signed-off-by: Sean Cross <sean@xobs.io>
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
In this PR we address several issues encountered with certain CMSIS-DAP adaptors, notably ones from Atmel such as the JTAGICE3 which use HID (CMSIS-DAP v1.0.0, the unpublished spec) and massive packets (512 bytes) over HS.
We aim with this to fix the transfer behaviour for these adaptors (the packets are one byte too short before this, causing problems with the communication cycle), and provide various fallbacks and such for commands not implemented in the older versions of the spec.
The over-all result should be a more stable CMSIS-DAP experience and saner behaviour out of HID based adaptors.
Your checklist for this pull request
Closing issues