STMicroelectronics / cmsis_device_f1

Provides the STM32Cube MCU Component "cmsis_device_f1" of the STM32F1 series.
Apache License 2.0
36 stars 4 forks source link

The default clock speed for all F1xx chips is wrong #3

Closed jcw closed 4 months ago

jcw commented 1 year ago

Describe the set-up

Describe the bug The default clock speed for all F1xx chips is wrong. It is set to 16000000, but should be 8000000, see https://github.com/STMicroelectronics/cmsis_device_f1/blob/master/Source/Templates/system_stm32f1xx.c#L141

How To Reproduce

  1. Any CMSIS-based build which does not reconfigure the clock tree will have the wrong SystemCoreClock value. This will cause baudrate calculations to be wrong, for example.

  2. The modules that you suspect to be the cause of the problem (Driver, BSP, MW ...) Source/Templates/system_stm32f1xx.c, line 141

  3. The use case that generates the problem See 1.

  4. How we can reproduce the problem See 1.

Additional context This bug was first reported here: https://github.com/platformio/platform-ststm32/issues/698

Screenshots N/A.

ALABSTM commented 1 year ago

Hello @jcw,

Thank you for this report. We will get back to you as soon as we analyze it further. This may take some time. Thank you for your comprehension.

With regards,

TOUNSTM commented 1 year ago

ST Internal Reference: 155856

TOUNSTM commented 4 months ago

Fixed in commit 1d9e5f4f580ea970bdc512252ff0edf10481b5b2

jcw commented 4 months ago

Thank you.