cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with SPI Serial Clock (SPI_SCK) signal not getting generated on H7

Tim Russell
Associate III

I have an app that uses SPI5 on an F7 chip with no problems, but it no longer works when I upgraded to the H7 chip (at the same time I changed to using SPI2).

I am no longer getting the serial clock signal (SPI_SCK) on SPI2 on the H7 chip.

I defined SPI2 to be the same as SPI5 was defined.

As a test, I changed SPI2's CLKPolarity for SPI_POLARITY_LOW (as it was on SPI5 on F7) to SPI_POLARITY_HIGH, and I started seeing the SCK signal on my logic analyzer.

The clock polarity should not make a difference on the SCK signal getting generated, but it will make a difference when communicating with the slave device.

SPI6 works fine on the H7 (SCK signal is generated when set to SPI_POLARITY_LOW).

Any suggestions or reported problems with SPI on H7.

5 REPLIES 5
alister
Lead

SPI2 CLK works ok with stock STM32CubeMX 5.2.0 init on my STM32H743VI.

You might learn more with an oscilliscope.

MRupp.11
Associate II

Hello alister,

do you have your complete project for reference for me,

Thanks you

Marc

Tim Russell
Associate III

Marc,

Thanks for responding. Actually, I resolved my issue with the SPI interface by reducing the clock signal that was supplying the SPI interface from 100MHz down to 30MHz and the actual SPI Baud Rate to 7.5Mb/s.

There are complete examples in the Cube FW.

MRupp.11
Associate II

​Hello Tim,

i am currently facing some issues with SPI on H7 Nucleo.

Besides the fact that iam having tried the example and there is no erro by debugging the code (Debugger steps into "all fine" if_else branch, i am still having no output on the pins at all.

To make a long story short:

Is it possible to send me your fixed example project, so i can study it  in more detail for reference ?

Thanks in advance

Marc