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

Commit 3195335

Browse files
committed
cmsis_dap: fix final byte for split transactions
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>
1 parent d5ef5eb commit 3195335

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/platforms/hosted/dap_command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ bool perform_dap_jtag_sequence(
321321
memcpy(data_out, response + 1U, sequence_length);
322322
/* And the final bit from the second response LSb */
323323
if (sequences == 2U)
324-
data_out[final_byte] = (response[1 + sequence_length] & 1U) << final_bit;
324+
data_out[final_byte] |= (response[1 + sequence_length] & 1U) << final_bit;
325325
}
326326
/* And check that it succeeded */
327327
return response[0] == DAP_RESPONSE_OK;

0 commit comments

Comments
 (0)