MKR1000 and MAX31855K don't play nice with each other

I got the thermocouple breakout MAX31855K to work with my Arduino Pro Mini, following the tutorial at https://learn.sparkfun.com/tutorials/ma … okup-guide.

I thought I’d try the same with my Arduino MKR1000. I’m noticing that as soon as I upload the sample sketch (SparkFun_MAX31855K_Thermocouple_Breakout.ino) the MKR1000 becomes unresponsive, and no longer known to the computer. I have to double press the reset button before the computer sees the board again.

This is how I hooked up the MAX31855K to the MKR1000:

MAX31855K → MKR1000


!CS → pin 6

NC → I didn’t connect

SO → pin 10

SCK → pin 9

VCC → VCC

GND → GND

[attachment=0]IMG_1743_2.JPG[/attachment]

I modified line 33 of the sketch to make the CHIP_SELECT_PIN = 6, and I commented line 45 and uncommented line 52 (I wanted to see some debugging info).

As soon as I upload the sketch, the board disappears from device manager (Windows 10). Unplugging/plugging USB cable doesn’t help. I have to double press the reset button.

I’ve tried moving SS to different digital pins but that doesn’t help. Do I have the pin assignments correct?

I tried searching for help, I found one link on Google that suggested the SPI library doesn’t play nice with MKR1000 + MAX31855K, but when they rewrote the digital read functions themselves it worked. They didn’t provide any details so I don’t know what they mean by rewritting the digital read functions.

I found that if I commented out the “SPI.begin()” in the SparkFunMAX31855k constructor (line 48) and called SPI.begin() in my setup() function, everything seems to work now.