From 8c621c16d09c05566016c8a4e88227ca801f51a1 Mon Sep 17 00:00:00 2001 From: ALTracer <11005378+ALTracer@users.noreply.github.com> Date: Fri, 4 Oct 2024 21:54:30 +0300 Subject: [PATCH] at32f43x: Log contents of DEBUG Series ID register in case UID is unreadable --- src/target/at32f43x.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/target/at32f43x.c b/src/target/at32f43x.c index c5104c48172..a5a781eda1d 100644 --- a/src/target/at32f43x.c +++ b/src/target/at32f43x.c @@ -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))