Skip to main content
Peter M
Associate
January 26, 2018
Solved

HSI/2 before PLLSRC in STM32F030xC ?

  • January 26, 2018
  • 12 replies
  • 2631 views
Posted on January 26, 2018 at 18:50

Hi,

I have a problem with the PLLSRC of a STM32F030RC : to obtain 24MHz for the sysclk I have to use PLLMUL @ x6 with HSI (8MHz) but 6x8 = 48MHz ?

If I output the sysclk on a MCO pin (with no div) I have actually 24MHz.

After use of SystemCoreClockUpdate() from system_stm32f0xx.c the variable SystemCoreClock equals to 48000000 and my call to SysTick_Config(SystemCoreClock/1000) gives a wrong systick frequency ( 2 x too slow, the actuel sysclock is 24000000).

In the reference manual RM0360 at the figure 11 I see no div /2 between HSI and PLLSRC for my STM32F030xC.

But the behaviour 

seems like in the figure 10, with a /2 ....

Where is the mistake ?

Thanks

Peter

    This topic has been closed for replies.
    Best answer by waclawek.jan
    Posted on June 28, 2018 at 15:37

    Use this setting:

    0690X0000060LWZQA2.png

    JW

    12 replies

    Amel NASRI
    ST Technical Moderator
    January 30, 2018
    Posted on January 30, 2018 at 17:26

    Hi

    Miles.Peter

    ‌,

    Please check the content ofRCC_CFGR2: is PREDIV set to '0001' or '0000'?

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
    Peter M
    Peter MAuthor
    Associate
    February 25, 2018
    Posted on February 25, 2018 at 12:05

    Hi Amel,

    Sorry for my late reply. But it is still a mystery for me, I checked the PREDIV of  the RCC_CFGR2 and it is '0000'.

    So I have tried with RCC_CFGR2 set to '0001' and even '0010', but it has no effect on the output frequency still at 24MHz with my 

    PLLMUL @ x6.

    On the other hand I am able to read these values in debug mode with atollic and it seems this register is well programmed.

    The behaviour is really like a STM32F030x6 and not a STM32F030xC .

    Is it a bad interpretation of the reference ? My chip is marked as STM32F030RCT6.  Is it a x6 or a xC ???

    Thanks for your help.

    Peter

    Amel NASRI
    ST Technical Moderator
    June 13, 2018
    Posted on June 13, 2018 at 14:54

    Hi

    Miles.Peter

    ‌,

    Sorry to come back to this discussion so late.

    I would like to inform you that we made the test from our side using the same configuration as yours to output SYSCLK on MCO. The output frequency is 48 MHz.

    To continue investigating the issue,could you please share the content of both registers RCC_CFGR and RCC_CFGR2?

    -Amel

    To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.