cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32 operate on 400MHZ clock frequency. Then what is SPI frequency

MDeva.1
Associate II

Hello ,

I am using NUCLEO-H7 board it operates on 400MHZ clock frequency the APB clock is 100MHZ.

But on which frequency spi operate on 400MHZ or 100mHz. In stmcubmx clock configuration

SPI 1,2,3 clock mux option selected is PER_CK 64 MHZ. And baudatare prescalar_32 .can you explain me on which frequency spi operate?

8 REPLIES 8
TDK
Guru

PER_CK is 64 MHz, and your prescaler is 32, so the SPI clock rate is 64 MHz/32 = 2 MHz.

It should also be listed explicitly within CubeMX.

0693W00000BavkbQAB.png

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

Look at the Clock configuration tab.

SPI1,2,3 and SPI4,5 have different clock source mux.

For example you can select PLL1Q, and PLL1 output Q is 40 MHz, so that will be the source clock for SPIs 1,2,3.

Then each SPI has it's own prescaler.

0693W00000BavsBQAR.png 

PER_CK is output of yet another MUX :

0693W00000BawKtQAJ.png 

According to the MANUAL, it depends on the SPI unit, but 200 MHz or 125 MHz are the MAXIMUM rates the units can be clocked at.

https://community.st.com/s/question/0D53W00000q3HxxSAE/stm32h7x3-max-spi123-and-spi45-kernel-clock-freq

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

I don't understand the on which frequncy spi is operate.it opertaes on 64MHZ or 100MHZ.On which frequncy baudrate prescalar is divide.

if 100MHZ then 100mhz/32=3.125MHZ

or

64MHZ/32=2MHZ

because spi can opertae under the 5MhZ.

so can you help me?

What do you measure on SCK currently?

What frequency do you actually want to achieve?

Typically you'll get the peripheral's​ bus clock divided by the prescaler.

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

what is differnce between per_clk and PLL1q. I am confusing of spi clock i dont have much knowledge of spi clock.I just want that my spi interfacing work propely.

MDeva.1
Associate II

0693W00000Baz5hQAB.png

When I set the clk frequcny upto 400MHZ if i select the PLL1Q clk it throws error it shows 400MHZ.So i have to select the clk_per if i selct that in cubemx it not shows error.so I want know the option per_clk i select its right or wrong why i am unable to select the PLL1q.Please help i am very confused.