• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    Alva
    last edited by Alva 12 Mar 2024, 16:46 3 Dec 2024, 16:45

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

    undefined 1 Reply Last reply 3 Dec 2024, 18:11 Reply Quote 0
    • undefined
      oliof @Alva
      last edited by oliof 12 Mar 2024, 18:12 3 Dec 2024, 18:11

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

      undefined 1 Reply Last reply 4 Dec 2024, 17:12 Reply Quote 0
      • undefined
        Alva @oliof
        last edited by Alva 12 Apr 2024, 17:13 4 Dec 2024, 17:12

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

        undefined 1 Reply Last reply 6 Dec 2024, 11:25 Reply Quote 0
        • undefined
          dc42 administrators @Alva
          last edited by 6 Dec 2024, 11:25

          @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
          1 out of 4
          • First post
            1/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA