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

Commit c3437fe

Browse files
committed
stm32l4: Improved the device lookup handling on attach by using the copy stored in the private structure
1 parent 8bb8393 commit c3437fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/target/stm32l4.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,8 @@ static bool stm32l4_attach(target_s *const target)
744744
if (!cortexm_attach(target) || !stm32l4_configure_dbgmcu(target, NULL))
745745
return false;
746746

747-
/* Retrieve device information, and locate the device ID register */
748-
const stm32l4_device_info_s *device = stm32l4_get_device_info(target->part_id);
747+
/* Extract the device structure from the priv storage and enable the Flash if on an L55 part */
748+
const stm32l4_device_info_s *const device = ((stm32l4_priv_s *)target->priv)->device;
749749
if (device->family == STM32L4_FAMILY_L55x)
750750
stm32l5_flash_enable(target);
751751

0 commit comments

Comments
 (0)