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

    Klipper on Duet 3 Mainboard

    Scheduled Pinned Locked Moved
    Using Duet Controllers
    15
    43
    11.1k
    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.
    • Andrey 0undefined
      Andrey 0
      last edited by

      Hello everyone! You can install a klipper firmware on the duet 3 mainboard? How to flash any .bin file on the duet 3 mainboard? Please tell me.

      Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
      • Luke'sLaboratoryundefined
        Luke'sLaboratory @Andrey 0
        last edited by

        @andrey-0
        Making guesses as to what you're actually asking -

        Yes, I have a working klipper config+flash setup for the Duet3 Mini 5+. I have a few updates i need before the config is merged into the main repo, but its been tested on 3 duet3 mini's. I'll probably have the updates ready this weekend.
        https://github.com/KevinOConnor/klipper/pull/4133

        I have been trying to get my duet3 6hc to "talk" klipper, but have been stymied in the initial conversation between host and MCU. From my review, the ATSAME70q should run the same code as the SAM4E on the duet2, but i haven't been able to raise comms via either USB (atsame70q doesn't appear to call out physical pins like PB13 that klipper expects) nor UART. I suspect that I'll need to re-map the physical addresses of the pins in order to get this to work.

        Hope this helps.

        lukeslaboratory opened this pull request in KevinOConnor/klipper

        closed Config: Add Generic-Duet3-Mini.cfg Board Config #4133

        Luke
        http://lukeslab.online

        dc42undefined Andrey 0undefined 2 Replies Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators @Luke'sLaboratory
          last edited by

          @luke-slaboratory, the USB peripheral on the SAME70 is different from the one on the SAM4E.

          Leave the cache disabled on the SAME70 initially, get it working without cache first.

          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

          Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 1
          • Luke'sLaboratoryundefined
            Luke'sLaboratory @dc42
            last edited by

            @dc42 said in Klipper on Duet 3 Mainboard:

            @luke-slaboratory, the USB peripheral on the SAME70 is different from the one on the SAM4E.

            Leave the cache disabled on the SAME70 initially, get it working without cache first.

            Hi! Thank you!!!!!

            Yeah I saw in the docs that it has a high-speed USB bus instead of a full-speed USB bus. Any documentation thats quick to share that I could read through to make the transition from the full-speed on the SAM4E? (Honestly just being pointed to the relevant lines of code the firmware would be great) Klipper only needs ~10kb/s max, so as long as its consistent I'm happy.

            As for the cache - are you referencing the quad SPI flash at 0x80000000?

            Luke
            http://lukeslab.online

            dc42undefined 1 Reply Last reply Reply Quote 1
            • dc42undefined
              dc42 administrators @Luke'sLaboratory
              last edited by

              @luke-slaboratory said in Klipper on Duet 3 Mainboard:

              Any documentation thats quick to share that I could read through to make the transition from the full-speed on the SAM4E? (Honestly just being pointed to the relevant lines of code the firmware would be great) Klipper only needs ~10kb/s max, so as long as its consistent I'm happy.

              All I can suggest is that you look at the code that RRF uses to interface to the USB peripheral, at https://github.com/Duet3D/CoreN2G/blob/3.3-dev/src/SAM4S_4E_E70/SerialCDC.cpp. It calls the USB stack in ASF 3, which is at https://github.com/Duet3D/CoreN2G/tree/3.3-dev/src/SAM4S_4E_E70/asf/common/services/usb. That code in turn calls the USB driver for whichever type of USB peripheral is present.

              As for the cache - are you referencing the quad SPI flash at 0x80000000?

              No, the memory cache built into the SAME70. It greatly improves performance, but it is tricky to use with DMA.

              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

              Luke'sLaboratoryundefined Andrey 0undefined 2 Replies Last reply Reply Quote 1
              • Luke'sLaboratoryundefined
                Luke'sLaboratory @dc42
                last edited by

                @dc42

                Thank you so much! I'm not a embedded dev (Mechanical Engineer here) so it gets hard for me to tell where all the things are coming/going, so this will probably be a big help!!! -

                re: Cache - I'm not sure what klipper does regarding the cache - the only characteristics I've played with are the ram location, bootloader offsets, that kind of thing. I'll put my nose back in the datasheets and see what I can come up with!

                Thank you!!

                Luke
                http://lukeslab.online

                1 Reply Last reply Reply Quote 1
                • Andrey 0undefined
                  Andrey 0 @Luke'sLaboratory
                  last edited by

                  @luke-slaboratory Hello.
                  Did you manage to make a config for Duet 3 6HC?

                  1 Reply Last reply Reply Quote 0
                  • Andrey 0undefined
                    Andrey 0 @dc42
                    last edited by

                    @dc42 Hello.
                    Did you manage to make a config for Duet 3 6HC?

                    Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
                    • Luke'sLaboratoryundefined
                      Luke'sLaboratory @Andrey 0
                      last edited by

                      @andrey-0 No. I have not successfully flashed the duet3 6hc with Klipper. I am finalizing my work on the config for the Mini 5 (trying to get the external clock to work for better clock sync) before moving to the 6hc, 3hc, and 1lc.

                      Luke
                      http://lukeslab.online

                      Andrey 0undefined 2 Replies Last reply Reply Quote 0
                      • Andrey 0undefined
                        Andrey 0 @Luke'sLaboratory
                        last edited by

                        @luke-slaboratory Thank you! I will wait.

                        1 Reply Last reply Reply Quote 0
                        • Andrey 0undefined
                          Andrey 0 @Luke'sLaboratory
                          last edited by

                          @luke-slaboratory Hello.
                          Did you manage to make a config for Duet 3 Mini 5 or Duet 3 6HC?

                          Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
                          • Luke'sLaboratoryundefined
                            Luke'sLaboratory @Andrey 0
                            last edited by

                            @andrey-0

                            Hi!

                            I'm still learning on microcontroller code, and I've been tasked to integrate the external clock on the d3 mini. this will take additional time. the config+flash settings that I have posted on the PR work fine for now, but my final merge will be more accurate timings for multi-MCU sync.

                            Luke
                            http://lukeslab.online

                            Andrey 0undefined 1 Reply Last reply Reply Quote 0
                            • Andrey 0undefined
                              Andrey 0 @Luke'sLaboratory
                              last edited by

                              @luke-slaboratory Hello.
                              Did you manage to make a config for Duet 3 Mini 5 or Duet 3 6HC?

                              Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
                              • Luke'sLaboratoryundefined
                                Luke'sLaboratory @Andrey 0
                                last edited by Luke'sLaboratory

                                @andrey-0

                                Thanks for the interest.

                                You can visit my github to get a config and flashing information that will work with the mini 5. I haven't yet got it working with the external crystal (which is the condition for merging it into mainline klipper), but using the internal crystal it absolutely works and works well.

                                Luke
                                http://lukeslab.online

                                dc42undefined 1 Reply Last reply Reply Quote 0
                                • dc42undefined
                                  dc42 administrators @Luke'sLaboratory
                                  last edited by

                                  @luke-slaboratory said in Klipper on Duet 3 Mainboard:

                                  I haven't yet got it working with the external crystal (which is the condition for merging it into mainline klipper), but using the internal crystal it absolutely works and works well.

                                  Why does Klipper want to use an external crystal?

                                  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

                                  Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
                                  • Luke'sLaboratoryundefined
                                    Luke'sLaboratory @dc42
                                    last edited by

                                    @dc42

                                    I might have not explained correctly, There's an External Clocking Crystal on PB22/PB23 per the schematic (which was released after I started this project) - The build that I was flashing+using on the Mini5+ didn't set up the clock using an external crystal (or is it just called a clock?) instead using the internal clock. They have requested that I use the external crystal that's baked into the board as they believe it will aid in multi-mcu sync with better clock predictions.

                                    I think they're going for "if its there, use it"

                                    Luke

                                    Luke
                                    http://lukeslab.online

                                    Andrey 0undefined 1 Reply Last reply Reply Quote 0
                                    • Andrey 0undefined
                                      Andrey 0 @Luke'sLaboratory
                                      last edited by

                                      @luke-slaboratory

                                      Good evening.

                                      I am trying to run klipper on Duet 3 6HC.

                                      Why, after applying the changes recommended by this link https://github.com/KevinOConnor/klipper/pull/4133/commits/0d5c6d3c029e68875c4adfe3cdc18913ec71bed8, after command make menuconfig, klipper gives an error, here is a photo of the error.

                                      Screenshot_1.png

                                      Thank you very much!

                                      lukeslaboratory opened this pull request in KevinOConnor/klipper

                                      closed Config: Add Generic-Duet3-Mini.cfg Board Config #4133

                                      Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
                                      • Luke'sLaboratoryundefined
                                        Luke'sLaboratory @Andrey 0
                                        last edited by

                                        @andrey-0

                                        Hi - my PR is only for the Mini5+. it doesn't work at all on the 6hc yet.

                                        Luke
                                        http://lukeslab.online

                                        1 Reply Last reply Reply Quote 0
                                        • rockydubbundefined
                                          rockydubb
                                          last edited by

                                          @luke-slaboratory Hi, did anyone get around to getting the Duet 3 6HC board to work with Klipper successfully?? Ive been searching since last night on how to get this working just to try it out ... but no luck. Thanks.,

                                          Ender 5 Plus - Duet 3 6HC / TMC5160's
                                          Creality CR-10 V2 - Duet 2 Wi-Fi / TMC5160's
                                          FlashForge Inventor Dual Extruder / Bondtech BMG Dual Extruders

                                          Luke'sLaboratoryundefined 1 Reply Last reply Reply Quote 0
                                          • Luke'sLaboratoryundefined
                                            Luke'sLaboratory @rockydubb
                                            last edited by

                                            @rockydubb

                                            I have two 6hc's on my desk right now in various states of klipper-ification. We're currently trying to figure out something spooky in the clock code - it initializes serial comms on UART1 correctly, but something goes haywire immediately after and it freaks out and stops talking.

                                            Sorry, but we are working on it.

                                            Luke
                                            http://lukeslab.online

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