Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Driver error status bits

    Scheduled Pinned Locked Moved
    General Discussion
    3
    4
    133
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Alvaundefined
      Alva
      last edited by Alva

      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 ?
      e28316b6-aeb0-4fdb-9ac9-03bc5ed3f78d-image.png.
      8455c73c-70b5-45e6-bdba-b305fbf15762-image.png
      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?.

      oliofundefined 1 Reply Last reply Reply Quote 0
      • oliofundefined
        oliof @Alva
        last edited by oliof

        @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

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        Alvaundefined 1 Reply Last reply Reply Quote 0
        • Alvaundefined
          Alva @oliof
          last edited by Alva

          @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.
          595162d8-b5af-4f73-a60c-b1bf1241bdb2-image.png
          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.

          dc42undefined 1 Reply Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @Alva
            last edited by

            @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.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA