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

    Duet Wifi 3.2beta2 crashes with long menu file

    Scheduled Pinned Locked Moved
    Beta Firmware
    3
    11
    457
    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.
    • spwundefined
      spw
      last edited by

      When the menu file is over 30 lines long the board restarts when the menu is selected. Making the menu shorter by a few lines makes it stable for a little bit and crashes after a moment. Short menus < 20 seem to work fine. Maybe memory issue?

      My HW:
      Duet Wifi v1.03 with 3.2beta2 firmware

      My config:

      M918 P1 E4 F2000000
      

      crashing menu file:

      text R0 C2 F0 T"x:"
      alter N510 D1 W26
      text C46 T"y:"
      alter N511 D1 W26
      text C88 T"z:"
      alter N512 D2 W32
      
      image R12 C0 L"hline.img"
      
      text R14 C1 F0 T"x"
      button C11 T"-50 "  A"G91 G1 X-50 F6000"
      button C32 T"-10 "  A"G91 G1 X-10 F6000"
      button C50 T" -1 "   A"G91 G1 X-1 F6000"
      button C69 T"+1 "   A"G91 G1 X1 F6000"
      button C87 T"+10 "  A"G91 G1 X10 F6000"
      button C108 T"+50 " A"G91 G1 X50 F6000"
      
      text R26 C1 F0 T"y"
      button C11 T"-50 "  A"G91 G1 Y-50 F6000"
      button C32 T"-10 "  A"G91 G1 Y-10 F6000"
      button C50 T" -1 "  A"G91 G1 Y-1 F6000"
      button C69 T"+1 "   A"G91 G1 Y1 F6000"
      button C87 T"+10 "  A"G91 G1 Y10 F6000"
      button C108 T"+50 " A"G91 G1 Y50 F6000"
      
      text R38 C1 F0 T"z"
      button C11 T"-25 " A"G91 G1 Z-25 F6000"
      button C32 T"-5 "  A"G91 G1 Z-5 F6000"
      button C50 T" -1 " A"G91 G1 Z-1 F6000"
      button C69 T"+1 "  A"G91 G1 Z1 F6000"
      button C87 T"+5 "  A"G91 G1 Z5 F6000"
      button C108 T"+25 " A"G91 G1 Z25 F6000"
      
      image R50 C0 L"hline.img"
      button R51 C0 F0 T"<" A"return"
      button T" Home All " A"M98 P/sys/homeall.g"
      
      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        Please run M122 and check the value shown as Never Used RAM.

        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
        • spwundefined
          spw
          last edited by spw

          Never used ram: 76
          

          value with smaller menu: 468
          value without screen (no M918): 5968

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

            That's the problem then, RepRapFirmware has run out of RAM. Try creating fewer elements per menu page.

            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
            • spwundefined
              spw
              last edited by

              What value I should be aiming for safe operation?

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

                I suggest you aim for at least 200 bytes free, after switching between different menus repeatedly and doing a print.

                The difficulty is that RRF on the Duet WiFi/Ethernet supports up to 12 stepper drivers, so it needs more RAM for the movement buffers than the Maestro does.

                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
                • spwundefined
                  spw
                  last edited by

                  I'm using only 3 motors is there an easy way to free this memory, I can recompile firmware if needed.

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

                    @spw said in Duet Wifi 3.2beta2 crashes with long menu file:

                    I'm using only 3 motors is there an easy way to free this memory, I can recompile firmware if needed.

                    Yes, you can reduce the value of NumDms in file Move.h. I suggest you reduce the *8 to *4.

                    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
                    • spwundefined
                      spw
                      last edited by

                      Thank you it helped a lot. I reduced *8 to *5 and it doubled free memory, now with the complex menu, I still have 4000+ bytes free.

                      Since the memory is dynamically allocated do you think you could add a GCode to reallocate this buffer so I don't have to recompile firmware with every version, I think other users would benefit too since 4 motors + 1 or 2 heater is the most common setup.

                      seraserundefined 1 Reply Last reply Reply Quote 0
                      • seraserundefined
                        seraser @spw
                        last edited by

                        @spw said in Duet Wifi 3.2beta2 crashes with long menu file:

                        Thank you it helped a lot. I reduced *8 to *5 and it doubled free memory, now with the complex menu, I still have 4000+ bytes free.

                        Since the memory is dynamically allocated do you think you could add a GCode to reallocate this buffer so I don't have to recompile firmware with every version, I think other users would benefit too since 4 motors + 1 or 2 heater is the most common setup.

                        Can you share your compiled firmware with only 5 motors?

                        1 Reply Last reply Reply Quote 0
                        • spwundefined
                          spw
                          last edited by

                          Duet2CombinedFirmware.bin

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