Driver error status bits
-
Hello,
Can you please help me understanding how the error status bits are output when there is a driver warning or error based on the trinamic driver datasheet ?
.
I cannot really understand the values. For example 26th bit is high means Overtemp pre warning flag. What would be the output status from Duet?. -
@Alva RRF actually interprets those error bits already. On the pre warning for overtemp you get a warning on the console, and the fake driver thermistor will report 100C s you could setup a thermostatically controlled fan using that value.
In addition, driver errors generate events, which you can handle in your own macros. See https://docs.duet3d.com/en/User_manual/RepRapFirmware/Events#events
-
@oliof Hello,
Background story: I was trying to translate the error status bit which the board has reported back. I looked at the data sheet to figure out what the error corresponds to is and got confused.
As i attached the image of datasheet and the duet event table above, Tried to compare the values that i got back and computed the binary for it but the value was bit different.
the binary of 192 is 1100 0000 , but according to data sheet it is 96: 0110 0000 if we take the 8 bits from MSB 31 to 24.
Conclusion : The above mentioned discrepancy made me look into the RRF in the section CANlib/src/RRF3common.h -> union StandardDriverStatus , it is calculated differently. And it make sense now why the value was 192.
But can be a problem if someone wants to translate the error status bits to the proper error message. Thank you for your time. -
@Alva the reason that the bit assignments are different between the datasheet and the status reported by RRF is that different Trinamic drivers use different status bit assignments. RRF uses the same bit assignments for all drivers so that you can interpret them without knowing what driver type is used. Also it has a few status bits that don't correspond to any Trinamic status bits, for example when using closed loop drivers.
The bit assignments RRF uses are mostly the same as for Trinamic TMC2209 drivers.