SPI communication between STM32H743ZI2 and Adafruit MAX31865 using Simulink encoder
Hello,
I would like to read the temperature value from PT1000 (AT103), to ease the reading, I am using an Adafruit MAX31865 (configured as 2 wires RTD reader).
I plugged all components to an Arduino (both UNO and MEGA) and everything works perfectly, however I am required to do it over an STM32H743ZI2 board and here comes troubles...
I am using the Embedded Coder Support Package for STM32 add-on for Simulink alongside STM32CubeMX to configure my board.
I am using SPI1 with the following pinout configuration:
- PB3 = SPI1_SCK
- PB4 = SPI1_MISO
- PB5 = SPI1_MOSI
- D7 = CS
On Simulink side, I am using SPI Controller Transfer blocks configured as follow:
- SPI module = SPI1
- Clock Polarity = Low
- Clock Phase = 1 Edge (as required by MAX31865 board)
- Register Address = 0x00 (to configure MAX board) and then 0x01 and 0x02 to read RTD data
- Data bits = 8
- Chip select calling method = Explicit GPIO calls
- Chip select polarity = Active Low
- Chip select port name = GPIOD
- Chip select pin number = 7
With all those configuration, it should work but, when I plug in my scope here is what I observe:

In order to debug, I tried to plug the Arduino over the scope and here is what is observed:

For both captures, the signals are:
- Yellow = SCK
- Blue = MOSI
- Purple = MISO
The first question that comes to my mind is: Why when the Arduino is plugged, the MOSI is always set to '1' except when transmitting data while STM32 is always set to '0' even when transmitting data? Do I need to pull up the MOSI? Why do I never receive data while the register address appears to be properly send (regardless of the register address)?
Regards,
Mathieu
