This is an automated email from Gerrit.

"Ahmed Haoues <[email protected]>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/9612

-- gerrit

commit c256bf846487e53017c1a8a7fe918ce356a369ce
Author: HAOUES Ahmed <[email protected]>
Date:   Wed May 6 09:34:43 2026 +0100

    flash/stm32l4x: Reorder DBGMCU_IDCODE registers
    
    To avoid read errors on some targets (for example STM32WBA5 and STM32WBA6),
    read the possible IDCODE registers in the specified order.
    
    Change-Id: I0ae4290dbf5899f03accaf81fa90eb165b5745e6
    Signed-off-by: HAOUES Ahmed <[email protected]>

diff --git a/src/flash/nor/stm32l4x.c b/src/flash/nor/stm32l4x.c
index 1181ab9a4d..ac151a30bc 100644
--- a/src/flash/nor/stm32l4x.c
+++ b/src/flash/nor/stm32l4x.c
@@ -1884,7 +1884,7 @@ static int stm32l4_read_idcode(struct flash_bank *bank, 
uint32_t *id)
        struct target *target = bank->target;
 
        /* try reading possible IDCODE registers, in the following order */
-       uint32_t dbgmcu_idcode[] = {DBGMCU_IDCODE_L4_G4, DBGMCU_IDCODE_G0, 
DBGMCU_IDCODE_L5};
+       uint32_t dbgmcu_idcode[] = {DBGMCU_IDCODE_L4_G4, DBGMCU_IDCODE_L5, 
DBGMCU_IDCODE_G0};
 
        for (unsigned int i = 0; i < ARRAY_SIZE(dbgmcu_idcode); i++) {
                retval = target_read_u32(target, dbgmcu_idcode[i], id);

-- 

Reply via email to