0

I am trying to program an ESP32-S3 microcontroller to write and read the registers of a MAX31865 IC over SPI, but I cannot get anything meaningful out of the device.

The following image shows the schematic of the IC. The pins are connected to an ESP32 microcontroller. The MOSI and the SCK lines are pulled up to 3.3V with a 10k resistor, the MISO line as well but I've tried it without the pullup resistor as well.

enter image description here

At the MAX31865, the MOSI/SDI and the SCLK lines look fine, a bit noisy because of the long cables, but I think they look alright for a test setup.

enter image description here

The chip select looks fine as well (yellow is the SCK).

enter image description here

So it seems to me that the IC should get the message just fine. But I get nothing when I read. Now, if I don't pull up the MISO/SDO line with a 10k resistor to 3.3V, I measure absolutley nothing, just some minimal noise from the other lines. If I pull it up to 3.3V with a 10k resistor, I get the following (channel 1 is SCK, channel 2 is SDO):

enter image description here

I don't understand why I get only 0s. I have tried it with the config register after setting the value, I've tried it with the "High Fault Threshold MSB" register, which should default to 0xFF, I've tried it with the RTD register, but I always read all 0s.

Does anyone have any idea what the problem could be? And generally, should the MISO line be pulled up to 3.3V with a 10k resistor, or should it be left floating?

Marcell Juhász
  • 255
  • 2
  • 10
  • Firstly, can you confirm which package the MAX31865 is to rule out potential easy to make errors in the schematic. – Graham Jun 11 '23 at 09:01
  • You mentioned a long cable, which brings up three questions: 1. How long is the cable? 2. Are these scope measurements at the ESP32 end, or the ADC end? 3. Can you get the SPI bus to work if you drop the frequency to something much lower, say 100kHz? – Graham Jun 11 '23 at 09:03
  • Ehh, no, got it, the chip only supports SPI modes 1 and 3, mine was set to 0... But thanks for the reply anyway. – Marcell Juhász Jun 11 '23 at 11:02
  • 1
    Nice one! Glad you got it sorted – Graham Jun 11 '23 at 12:26

0 Answers0