cancel
Showing results for 
Search instead for 
Did you mean: 

Clock frequency for STM32F303

DetlefS
Associate III

Hi,

I used to run my STM32F303RE at 72Mhz clock from a 8Mhz CMOS oscillator. . Timers8/1 operated at 72Mhz as well. That worked fine. 

I had to change the CMOS oscillator from 8 to 24Mhz.

I tried two modifications, see attachment:

a) I changed PLLMul from x9 to x3 and left PREDiv. at /1.

b) I changed PREDiv to /3 and left PLLMul at x9.

In both cases CubeIDE clocktree was fine with the setup, 72Mhz imput clock at Timers8/1.

Eventually now the input clock of the timers is low by factor 9, it is 8Mhz. 

What did I miss?

Thank you.

Cheers

Detlef

 

3 REPLIES 3

Yes, sounds odd, not sure if we're missing some detail.

If you're using an XO (External Oscillator), rather than a crystal, you should be using HSE_BYPASS mode.

The Classic F3 architecture doesn't allow for different TIMCLK sources (Peripheral Clocks)

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AScha.3
Chief III

>Eventually now the input clock of the timers is low by factor 

I dont unterstand: how you know, what is the real timer clock now? And changing HSE and adapt divider will not change the timer clock.

If you feel a post has answered your question, please click "Accept as Solution".

Hi,

I know the real timer clock by routing the output of the timer to an output pin and hooking up an oscilloscope or a counter. This works fine since decades.

 

I don't know how to bypass HSE input logic, this block is grayed out, maybe there are switches which are not available with CubeIDE.

 

I just realized another weird aspekt: the baudrates for USART2 work fine, so the USART seems to have the exspected clockrate. I will check the clock frequency for the processor kernel with SYSTICKS, maybe the problem is limited to the counters.

THX

Cheers

Detlef