This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to read my RTD-sensor data using MAX31865 and NUCLEO-F767ZI?

Hi everyone,

I’m struggling here to make an SPI-code work   . Preformatted textMy circuit contains the following hardware:

MAX31865: Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/max31865.pdf

NUCLEO -F767ZI: Datesheet: NUCLEO-F767ZI | Mbed

RTD-Sensor

Since the MAX31865 requires SPI protocol I wrote this code to read my RTD-data:

#include “mbed.h”

SPI spi(PB_5, PB_4, PB_3); // mosi, miso, sclk
DigitalOut cs(PA_4);

int main()
{
// Chip must be deselected
cs = 1;

// Setup the spi for 8 bit data, high steady state clock,
// second edge capture, with a 1MHz clock rate
spi.format(8, 1);
spi.frequency(1000000);

// Select the device by seting chip select low
cs = 0;

// Send a dummy byte to receive the contents of the WHOAMI register
int x = spi.write(0x00);
printf("register = 0x%X\n", x);

// Deselect the device
cs = 1;
}

Does someone know why I’m not getting any data?

best regard,
Ezzow