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

Commit d0de91e

Browse files
UweBonnesanonymous0719
authored andcommitted
stm32l1: Use ID from DBGMCU_IDCODE
Otherwise STM32L152RC on stm32l152c-discovery is recognized with only 4k
1 parent 54ddc35 commit d0de91e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/target/stm32l0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ bool stm32l1_probe(target_s *const target)
342342
if (ap->partno != ID_STM32L1xxxB && ap->partno != ID_STM32L1xxxBxA && ap->partno != ID_STM32L1xxxC &&
343343
ap->partno != ID_STM32L1xxxD && ap->partno != ID_STM32L1xxxE)
344344
return false;
345-
target->part_id = ap->partno;
345+
target->part_id = target_mem32_read32(target, STM32L1_DBGMCU_IDCODE) & 0xfffU;
346346

347347
/* Now we have a stable debug environment, make sure the WDTs + WFI and WFE instructions can't cause problems */
348348
stm32l1_configure_dbgmcu(target);

0 commit comments

Comments
 (0)