Skip to content

Commit 51fdde4

Browse files
KooLruvirtual-maker
authored andcommitted
CPUFrequency via HAL_RCC_GetSysClockFreq
1 parent 2dc24a0 commit 51fdde4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hal/architecture/STM32/MyHwSTM32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ uint16_t hwCPUVoltage(void)
122122

123123
uint16_t hwCPUFrequency(void)
124124
{
125-
return F_CPU/100000UL;
125+
return HAL_RCC_GetSysClockFreq()/1000000UL;
126126
}
127127

128128
int8_t hwCPUTemperature(void)

0 commit comments

Comments
 (0)