spi_temperature: Fix incorrect max31856 spi initialization

Writes to the max31856 chip use "burst mode", so only one address
during the initialization sequence can be sent.  This fixes erroneous
"Cold Junction Fault" errors.

Reported by @NBouquain.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-11-23 09:52:20 -05:00
parent c6f870a655
commit 665ec5e987
1 changed files with 0 additions and 2 deletions

View File

@ -174,12 +174,10 @@ class MAX31856(SensorBase):
"16" : MAX31856_CR1_AVGSEL16 "16" : MAX31856_CR1_AVGSEL16
} }
value |= config.getchoice('tc_averaging_count', averages, "1") value |= config.getchoice('tc_averaging_count', averages, "1")
cmds.append(0x80 + MAX31856_CR1_REG)
cmds.append(value) cmds.append(value)
value = (MAX31856_MASK_VOLTAGE_UNDER_OVER_FAULT | value = (MAX31856_MASK_VOLTAGE_UNDER_OVER_FAULT |
MAX31856_MASK_THERMOCOUPLE_OPEN_FAULT) MAX31856_MASK_THERMOCOUPLE_OPEN_FAULT)
cmds.append(0x80 + MAX31856_MASK_REG)
cmds.append(value) cmds.append(value)
return cmds return cmds