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

    AssertionFailed error when calling device.select(10)

    Scheduled Pinned Locked Moved Solved
    Firmware developers
    2
    4
    217
    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.
    • tcamguilundefined
      tcamguil
      last edited by

      Hello,
      I am trying to add support for a custom SPI controlled LED on a Duet2 Ethernet
      and a Duet3 MB6HC. But whenever i try to configure the LED output the Firmware reboots with an assertionFailed error.
      M122_output.JPG

      I have copied the configuration steps of the SPI bus from the PT100 temperature sensor as good a I can but it seems that the device is not declared correctly
      LynxMod.h
      LynxterLED.cpp

      I tried to comment out certain lines to see which ones causes the error to occur so far it seems that it's the mutex that seems to fail to lock. Am I missing an important step or just way out from my approach.

      Also could you give me some pointers on how to debug such issues from now on?

      Thanks in advance for the help

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

        @tcamguil you will need to use the stack trace in the M122 report to debug this. The first item (0x599) is the line number of the assertion statement in the file and the second is the offset of a string in the compiled code for the file that contains the assertion. You can use the map file to identify which file this string is in.

        PS - are you certain that you are not attempting to call the SPI transaction code from the RRF initialisation code, before the shared SPI device and its mutex have been initialised?

        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

        tcamguilundefined 1 Reply Last reply Reply Quote 0
        • tcamguilundefined
          tcamguil @dc42
          last edited by

          I was indeed initializing the LED class before the initialisation of the shared SPI device

          Thank you for your answer

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

            @tcamguil glad to help, I'll mark this as solved.

            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
            • dc42undefined dc42 marked this topic as a question
            • dc42undefined dc42 has marked this topic as solved
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA