cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743ZI SPI Clock enhancement options

VKast.2
Associate II

Hi ST Support,

I have an STM32H743ZI and use SPI4 for the SPI communication.

I have generated the Project from the Cube MX and configured an SPI clock of 50Mhz, But on the Logic analyzer captures, I can see only the clock of 25Mhz. We are trying to interface with some Slaves where STM32H743ZI is a DMA Master.

It would be great if we get some code that can show us a Clock frequency of 50Mhz on the Logic analyzer.

I am attaching the Cube MX file for reference.

6 REPLIES 6
Mike_ST
ST Employee

Hello,

Please try PLL3Q as SPI4 input source clock, and configure:

DIVM3 : /3

DIVN3 : x96

DIVQ3 : /8

VKast.2
Associate II

Hello Mike,

If the above configurations are done, I am observing a SPI4 clock of 257Mhz with clock errors. But I need only 50Mhz for SPI4 and must see the same on the Logic analyzer.

What must be the input frequency?

If needed you can share me the ioc file with clock config

Mike_ST
ST Employee

The settings I gave you are derived from the .ioc you attached to this thread.

25 MHz XTAL, and HSE as input for the PLLs.

TDK
Guru

Is this a custom board? Most ST boards have an 8 MHz HSE clock source, not 25 MHz. Perhaps that's what is wrong, although it doesn't fully explain this:

> An SPI clock of 257 MHz

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

Hi,

For the settings that were suggested, It shows a SPI4 clock of 100Mhz. I need it to be 50Mhz and the same to be seen on the Logic analyzer.

TDK
Guru

So increase the prescaler by a factor of 2.

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