Skip to main content
yuri CH
Senior
November 29, 2021
Question

STM32H7 dual core - M4 SPI Issue

  • November 29, 2021
  • 1 reply
  • 953 views

After configuring SPI channel on the M4 core as a read only master (while observing signals on the scope) I was not able to generate a clock while using the 

HAL_SPI_Receive() functions (which returned HAL_ERROR status).

When I changed the configuration so that the M7 is the owner of this SPI channel (on the same physical pins) the clock was generated successfully and the status was HAL_OK each time.

At that point I detached this from my code and created a dedicated cubemx project for the purpose of testing this issue (default definitions were applied),

The result was the same – I was able to work with the SPI channel on the M7 and was not able to do the same on the M4.

please advise on what might be the cause for this problem and what can i do to resovle it?

thanks in advance,

This topic has been closed for replies.

1 reply

TDK
November 30, 2021

Probably an overrun.

When a function returns HAL_ERROR, read the ErrorCode within the handle to determine the cause of the error.

Use a slower clock speed or (better) use SPI in 2-line mode but leave the MOSI pin uninitialized. Using SPI in RXONLY mode is not recommended.

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