cancel
Showing results for 
Search instead for 
Did you mean: 

How to retrieve 8MHz from 168 MHz processor

sminder
Associate II
Posted on April 11, 2014 at 08:21

I've got STM32F407VE controller that works at 168 MHz. I need to get a 8 MHz clock frequency from it and I guessed to use a timer in PWM mode, but they all have a 42 MHz or 84 MHz clocks and so I can't use approriate divider for desired frequency. How can I get this frequency from the controller?

Oops, sorry. It is just an clock frequency to timer's periphery and I can use a half of CPU working frequency. I just ran the controller on 160 MHz and it looks well.

#stm32f407ve
3 REPLIES 3
Posted on April 11, 2014 at 10:15

Even if you use 168MHz as HCLK, timers run at twice of APB frequency (if APB clock is divided down from HCLK, which it has to be). So timers on APB2 run at 168MHz thus you should be able to extract 8MHz out of them.

If you use an 8MHz crystal as the timebase, you could output the HSE frequency to MCO or MCO2 (or a 16MHz crystal and output HSE:2 to MCO/MCO2).

I don't know much about the SDIO module, but if it can output continuous clock, then it could be set to be divided down to 8MHz from the 48MHz input.

You could also use the I2S PLL to generate a clock of different frequency from HCLK, and then output it either through MCO2, or through some of the I2S clock outputs.

JW
sminder
Associate II
Posted on April 15, 2014 at 08:39

Thanks a lot for the reply! Unfortunately I've got the 25 MHz crystal. But your information about secondary I2S PLL was very helpful.

Posted on April 15, 2014 at 18:54

So timers on APB2 run at 168MHz thus you should be able to extract 8MHz out of them.

This

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