Long story short I am running an due based board for a 3d printer(Ultratronics PRO). I am running repetier firmware dev version. I have 7 devices on the spi bus. 4 max31855 thermocouples, 1 SD card, 1 ST7920 Full graphic Smart controller, and an Ethernet IC. Ehternet is not used in firmware but could be a potential source of this problem even though the cs pin is always high
The problem the spi buss works okay when the sd card is removed except for 2 horizontal lines across the display. So lcd and the 4 thermocouples read correctly. But! when the sd card is inserted the thermocouples read all ones. Changing the spi settings like speed, mode, and polarity do not affect this error state of the thermocouples. However I can read and write files to the sd card without any issues. and the lcd display still responds to button presses and acts like it should except for the 2 lines. If the sd card is removed the thermocuples start reading correctly.
I have tried to read the sck and MISO pins on my Oscope but it is only good to 20 MHz and the due is at 84 MHz. I can see the the occasional string of 1's go across the screen but nothing else it appears to be too fast for the scope.
Any ideas for troubleshooting I'm kind of blind without the scope.
If you would like to look at the code
I have a vague understanding of SPI, like sw and Hw, and the modes but I am having a heck of a time trying to figure out which section to kick I can't tell if the thermocouple code is the cause or if the sd card code is the cause. Any help would be greatly appreciated. Thank you for your time and help.
MAX31855(1).pdf (562 KB)
datasheet_ultratronics10_05.pdf (221 KB)
graphicallcd_10.pdf (271 KB)