Skip to content

Commit

Permalink
adiv5_jtag: Add Cortex-M33 JTAG-DP to known partno
Browse files Browse the repository at this point in the history
  • Loading branch information
ALTracer committed Jan 14, 2025
1 parent b6ebf26 commit d07b523
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/target/adiv5.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,14 @@
* for the second and third JTAG-DPs which are still JTAG-DPv0.
*/
#define JTAG_IDCODE_PARTNO_SOC400_4BIT_ERRATA 0xba01U

/*
* ARM JTAG PARTNO values from Cortex-M33 TRM (ARM document ID 100230, issue 0100)
* A.4.2.2 Identification Code register, IDCODE, Table A-13 pg98
* (for TEALDAP/CM33DAP MINDP SWJ-DP/JTAG-DP)
*/
#define JTAG_IDCODE_PARTNO_SOC400_4BIT_CM33 0xba04U

/*
* ARM JTAG PARTNO values from CoreSight SoC-600 TRM (ARM document ID 101883, issue 0101-00)
* §10.2.2 css600_dp register descriptions, Table 10-2 pg90
Expand Down
3 changes: 3 additions & 0 deletions src/target/adiv5_jtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ void adiv5_jtag_dp_handler(const uint8_t dev_index)
/* Correct the LPC43xx errata PARTNO values */
if (dp->partno == JTAG_IDCODE_PARTNO_SOC400_4BIT_ERRATA)
dp->partno = JTAG_IDCODE_PARTNO_SOC400_4BIT;
/* Correct the GD32E50x PARTNO value */
else if (dp->partno == JTAG_IDCODE_PARTNO_SOC400_4BIT_CM33)
dp->partno = JTAG_IDCODE_PARTNO_SOC400_4BIT;

if (dp->partno == JTAG_IDCODE_PARTNO_SOC400_4BIT || dp->partno == JTAG_IDCODE_PARTNO_SOC400_8BIT)
dp->version = 0U;
Expand Down

0 comments on commit d07b523

Please sign in to comment.