cancel
Showing results for 
Search instead for 
Did you mean: 

No data on MOSI spi STM32H7

DavidWahlberg
Associate II

Hi i am struggling to make SPI work on my nucleo-h723z board. I am using Cubemx to configure and i press when asked to used the default setup for the nucleo board when creating the project.

CubeIDE is v. 1.15.1

CubeMX is v. 1.11.1

my code is very basic: 

while (1)
  {
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */

	  uint8_t address = 0x80;


	  HAL_SPI_Transmit(&hspi4, &address, 1, 100);
	  HAL_Delay(1000);
  }

I have put a logic analyzer on the clock, MOSI and MISO, but no matter what, I can only see the clock signal. 

DavidWahlberg_0-1718704055934.png

SPI in cubeMX is: 

DavidWahlberg_1-1718704094252.png

 

Any suggestions?

Friendly Regards, David

4 REPLIES 4
SofLit
ST Employee

Hello, 

Are you sure about the GPIO pin you configured in CubeMx for MOSI and what you probed with the analyzer? are they the same?

Are you sure you have used the correct Analyzer channel? I sometime use the incorrect channel 🙂!

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PPopo.1
Senior

Double check the clock polarity and phase and also please post pin configuration

DavidWahlberg
Associate II

Thank you for your reply!!
The pin configuration from cubeMx:

DavidWahlberg_0-1718707969420.png

DavidWahlberg_1-1718708016686.png

* I only scope SCK, MISO and MOSI on logic analyzer.

Setup is attached (_1781.png).

Hello,

Could you please double check my points above?

1- Are you sure you connected PE6 to channel 1 of the analyzer?

2- Are you sure you have used the correct analyzer channel? I sometime use the incorrect channel 🙂!

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.