Skip to main content
M4D
Associate II
May 9, 2022
Question

spi in STM32H7

  • May 9, 2022
  • 6 replies
  • 1422 views

SPI in stm32h7 (stm32h743iitx in slave mode) don't work, receive wrong values.

how I make spi to work correctly in stm32H7? its not clear at all

thanks,

This topic has been closed for replies.

6 replies

Tesla DeLorean
Guru
May 9, 2022

Perhaps review some worked examples?

STM32Cube_FW_H7_V1.9.1\Projects\NUCLEO-H743ZI\Examples\SPI\SPI_FullDuplex_ComIT\readme.txt

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
M4D
M4DAuthor
Associate II
May 10, 2022

I need example for stm32h743II , and it dose not exist in this library

Muhammed Güler
Senior III
May 9, 2022

First of all, you need to match the SPI configuration of the master device with the SPI configuration of your own device. data size, first bit, clock polarity and clock phase settings must match the master device.

M4D
M4DAuthor
Associate II
May 10, 2022

hi, 

all the configuration are the same,

but when I transmit from master to slave I get wrong values.

( to be more accurate I connected two boards via SPI, also connected common GND) 

any suggestions?

gbm
Super User
May 10, 2022

Suggestion #1: post some code showing the problem.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice
M4D
M4DAuthor
Associate II
May 10, 2022

its very simple code generated by cubeMX

use one st eval board and another board

cube code was generated ,receive and transmit values via SPI

the first MCU (master ) is stm32L100 and the second (slave) is stm32h743II (I understood that SPI with DMA don't work in this type of MCU, bug or something)

(note this is only for demonstration for existing board)