Skip to main content
Adalgiso
Associate III
June 9, 2017
Question

possible bug in clock generation

  • June 9, 2017
  • 1 reply
  • 1151 views
Posted on June 09, 2017 at 09:26

I am using cube 4.21 with a STM32F205 CPU.

I configured the clock to run at 120 Mhz (25Mhz crystal M=20, N 192, P 2) in the file system_stm32f2xx.c generated by cube, I have the following:

uint32_t SystemCoreClock = 16000000;

instead of

uint32_t SystemCoreClock = 12000000;

    This topic has been closed for replies.

    1 reply

    Nesrine M_O
    Associate
    June 9, 2017
    Posted on June 09, 2017 at 11:46

    Hi

    Castrignano.Adalgiso

    ,

    • Did you have an issue to obtain the right system clock?
    • SystemCoreClockvariable takes first theHSIvalue then is updated depending on user clock configuration

    • souint32_t SystemCoreClock = 16000000; is right.

    -Nesrine-

    Adalgiso
    AdalgisoAuthor
    Associate III
    July 6, 2017
    Posted on July 06, 2017 at 08:35

    Hi,

    You are right, 

    SystemCoreClock = 16000000 is correct.

    Nesrine M_O
    Associate
    July 6, 2017
    Posted on July 06, 2017 at 12:50

    You are right, 

    SystemCoreClock = 16000000 is correct.

    https://community.st.com/0D50X00009bMM5DSAW