Skip to content

Commit

Permalink
at32f43x: Log contents of DEBUG Series ID register in case UID is unr…
Browse files Browse the repository at this point in the history
…eadable
  • Loading branch information
ALTracer committed Oct 24, 2024
1 parent 7073171 commit 8c621c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/target/at32f43x.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,10 @@ bool at32f43x_probe(target_s *target)
const uint16_t part_id = idcode & AT32F4x_IDCODE_PART_MASK;
// ... and highest byte of UID
const uint8_t project_id = target_mem32_read8(target, AT32F4x_PROJECT_ID);
const uint32_t debug_ser_id = target_mem32_read32(target, AT32F43x_DBGMCU_SER_ID);

DEBUG_TARGET("%s: idcode = %08" PRIx32 ", project_id = %02x\n", __func__, idcode, project_id);
DEBUG_TARGET("%s: idcode = %08" PRIx32 ", project_id = %02x, debug_ser_id = %08" PRIx32 "\n", __func__, idcode,
project_id, debug_ser_id);

/* 0x0e: F437 (has EMAC), 0x0d: F435 (no EMAC). 4K/2K describe sector sizes, not total flash capacity. */
if ((series == AT32F43_SERIES_4K || series == AT32F43_SERIES_2K) && (project_id == 0x0dU || project_id == 0x0eU))
Expand Down

0 comments on commit 8c621c1

Please sign in to comment.