Skip to content

Commit 832a1ed

Browse files
committed
system(u0): update STM32U0xx system
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 3cd0a34 commit 832a1ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/STM32U0xx/system_stm32u0xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void SystemCoreClockUpdate(void)
309309
}
310310
/* Compute HCLK clock frequency --------------------------------------------*/
311311
/* Get HCLK prescaler */
312-
tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U) & 0xFU];
312+
tmp = AHBPrescTable[(((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos) & 0xFU)];
313313
/* HCLK clock frequency */
314314
SystemCoreClock >>= tmp;
315315
}

0 commit comments

Comments
 (0)