We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cd0a34 commit 832a1edCopy full SHA for 832a1ed
system/STM32U0xx/system_stm32u0xx.c
@@ -309,7 +309,7 @@ void SystemCoreClockUpdate(void)
309
}
310
/* Compute HCLK clock frequency --------------------------------------------*/
311
/* Get HCLK prescaler */
312
- tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4U) & 0xFU];
+ tmp = AHBPrescTable[(((RCC->CFGR & RCC_CFGR_HPRE) >> RCC_CFGR_HPRE_Pos) & 0xFU)];
313
/* HCLK clock frequency */
314
SystemCoreClock >>= tmp;
315
0 commit comments