Fill out above information andin all cases attach yourklippy.logfile (use zip to compress it, if too big). Pasting yourprinter.cfgis not needed Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there
Describe your issue:
After upgrading from raspberry pi 3B to 5 I always got thermocouple fault and seeing -249 degress, I checked SPI with analyzer, there is no data packets besides only couple 0x0 and 0x1.
Then I tried to power BTT MAX31865 from 5V from rgb pin and it worked, because it could successfully initialize before SPI communication.
Now I have on table setup of skr2 + btt 31865 + pt100. When I switch SD card to raspberry pi 3 it works, when I switch to raspberry pi 5 - it fails. I guess the problem that it is much faster and delay between startup and probes becomes too low.
Also, I’ve tried switching skr boards, 3186 “drivers” and that didn’t help. Boards were tested using PSU, on the table, without any drivers or wires, only 3186 connected and PT100 into driver socket and shielded blue usb from raspberry.
JFYI: spi_speed: 400000 is a little strange, the default is 4000000
Software SPI does not support rate limit, but it is probably running slightly slower than 4Mhz.
MAX31865 by itself supports up to 5Mhz, according to the datasheet.
Also, there is a error with initializing of TMC drivers, and looks like your MAX31865 configuration is missing the CS pin.
My bad, looks like for this sensor the name sensor_pin: PD12 is used.
Thermocouple is handled on the MCU side, so I don’t think it can be releated to the SBC in any way.
FWIW, there is no code to reset the sensor, only to initialize it.
So, technically, even if there is a some sort of race condition, where sensor is not ready and klipper tries to initialize it.
You can simply restart klipper, like FIRMWARE_RESTART after the first unsuccessful initialization, and the second one should be successful.
Yeah drivers were disconnected during tests as I mentioned above.
The interesting thing is that on rpi 5 I always get the error and by manipulating REPORT_TIME and MAX_INVALID_COUNT - setting them to high values and restarting klipper service I could finally get correct readings. Though this works only for some period, then mcu fails again.
This sounds and looks like a sort of hardware issue to my taste.
If you have appropriate equipment, I suggest you look at SPI signaling.
I’m not sure that I can assist you here without that sensor.
Only make general recommendations; it should work without 5v, and power from the motor driver mount should be enough.
Probably, there will be 3.3v on both sides.
About hypothesis that RPI5 is too fast, you can easily validate that, be simply clocking down RPI5.
Maybe there is just a supply power difference between RPI3 and RPI5, what causes strange issues. IDK, generally there is a SBC to MCU connection error, not the error with SPI located on MCU.
Just in case anyone is curious, there are schematics.