Fix: adiv5/6 JTAG version handling #2054
Merged
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
This PR addresses a mistake made in the way that we handle DP versioning for JTAG-DPs in ADIv5 and v6.
ADIv5 implements protocol version 0, while ADIv6 implements version 1. This is a totaly different thing to the detectable version from the JTAG IDCODE
PARTNO
field which is related to the DP version instead.We correct the low-level handling in adiv5_jtag.c with this, so that DPv0-2 work properly as protocol v0, while DPv3+ are protocol v1. This allows the PARTNO -> version translation to then be corrected and handled more appropriately.
Tested on a LPC4370.
Your checklist for this pull request
Closing issues