Photon freezes when using SPI with sensors and Display

Hello there! I use a1.8 "TFT 128x160 SPI display along with 4 PT100 temperature converters (SPI breakout boards with a MAX31865 chip). I managed to use the 4 breakout boards on the same SPI bus (with different Chipselectpins of course). The photon runs stable for at least 10 h and printing temperature to the serial port every second.

For the display i use the Adafruit_ST7735 and Adafruit_mfGFX libraries.

When I add the display code to also display temperature on the screen then it runs a few minutes and then suddenly the display freezes and the photon is stuck (no more readings to serial output).

I have another device without extra sensors (so just the display) and that works stable. So I guess it has something to do with the two types of devices on the same SPI bus. But I’m not sure where to debug or what tests to do find the cause.

Anyone an idea or hint how to proceed?

Hi Superholz,

could be, that some pull up resistors on the modules are going in parallel and the drive current is getting to high triggering some heat related protection in the master. This would explain the delayed freeze of the photon.
Does it fail faster after quickly resetting the photon?
You can check the termination of the SPI bus from CLK/MOSI to Vcc (and to GND) fully wired with a multimeter. You should read >1kOhm for normal SPI speeds (1 MHz?).

If resistors are fine, I would investigate the SPI bus for analog glitches (check waveforms by Oszi - look for ringing) followed by looking at the raw signals with something like a bus pirate or alike.
http://dangerousprototypes.com/blog/bus-pirate-manual/bus-pirate-spi-guide/

A few things you can try, if debugging is not possible directly:

cheers,
Quas7