File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
libraries/SrcWrapper/src/stm32 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1475,9 +1475,9 @@ uint32_t uart_getPCLK(UART_HandleTypeDef *huart)
1475
1475
#elif defined(STM32H7 )
1476
1476
uint32_t sysclk = HAL_RCC_GetSysClockFreq ();
1477
1477
#if defined(STM32H7A3xx ) || defined (STM32H7A3xxQ ) || defined(STM32H7B3xx ) || defined(STM32H7B3xxQ ) || defined(STM32H7B0xx ) || defined(STM32H7B0xxQ )
1478
- uint32_t prescaler = (RCC -> CDCFGR2 & ( 0x7UL << 9U )) >> 9U ;
1478
+ uint32_t prescaler = (RCC -> SRDCFGR & RCC_SRDCFGR_SRDPPRE ) >> RCC_SRDCFGR_SRDPPRE_Pos ;
1479
1479
#else
1480
- uint32_t prescaler = (RCC -> D2CFGR & ( 0x7UL << 9U )) >> 9U ;
1480
+ uint32_t prescaler = (RCC -> D3CFGR & RCC_D3CFGR_D3PPRE ) >> RCC_D3CFGR_D3PPRE_Pos ;
1481
1481
#endif
1482
1482
1483
1483
uint32_t apb4 = 1 ;
@@ -1521,7 +1521,7 @@ uint32_t uart_getPCLK(UART_HandleTypeDef *huart)
1521
1521
1522
1522
#if defined(STM32WB0 )
1523
1523
uint32_t sysclk = HAL_RCC_GetSysClockFreq ();
1524
- uint32_t ppre2 = (RCC -> CFGR & ( 0x7UL << 11U )) >> 11U ;
1524
+ uint32_t ppre2 = (RCC -> CFGR & RCC_CFGR_CLKSYSDIV ) >> RCC_CFGR_CLKSYSDIV_Pos ;
1525
1525
uint32_t apb2_div = 1 ;
1526
1526
1527
1527
switch (ppre2 ) {
You can’t perform that action at this time.
0 commit comments