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

    New Raspberry Pi Zero 2W

    Scheduled Pinned Locked Moved
    General Discussion
    10
    65
    4.0k
    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.
    • gloomyandyundefined
      gloomyandy @o_lampe
      last edited by

      @o_lampe I may be wrong but I think that those pio blocks are part of the rPi silicon and not part of the Arm core.

      Most of these devices are a combination of a core from Arm plus manufacturer specific peripheral devices. So for instance the SPI device on an STM mcu is more than likely totally different to the SPI devices on a microchip mcu even if they both have the same Arm core. Things get a little bit more confusing though because Arm does provide some standard peripheral designs, that some manufacturers may use (or I think can even modify). So for instance the the SSP device on the LPC1768 (which provides SPI functionality) is actually an ARM PrimeCell Synchronous Serial Port (PL022).

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators @gloomyandy
        last edited by T3P3Tony

        @gloomyandy said in New Raspberry Pi Zero 2W:

        pio blocks are part of the rPi silicon and not part of the Arm core.

        Yes they are rpi specific

        Some Atmel/Microchip processors have a similar (but much more limited) idea called "configurable custom logic" designed as hardware "glue logic".

        @o_lampe said in New Raspberry Pi Zero 2W:

        PIO statemachines .....I assume RRF uses them for pulse generation

        We do not as they are Rpi 2040 specific. Although we have considered a range of options for pulse generation.

        @o_lampe said in New Raspberry Pi Zero 2W:

        If we could integrate CAN-FD as PIO state machine in M0(Pico) hardware, we would only need a tranceiver...

        Yes, that would be great, anyone found an example of CAN or a similar protocol implemented on 2040 statemachines, with a reference for what bus speeds could be accommodated?

        @PCR using that CAN-FD bus IC & transceiver with a Pi (either directly on a Pi 2/3/4, or using a 2040 + USB to a PC) could certainly allow for bus monitoring and protocol diagnosis, independent of using an oscilloscope so that could be interesting.

        Alternatively it might allow Klipper or similar to use Duet 3 expansion boards w/o a mainboard, they could implement the Duet CAN-FD protocol on the pi and send the planned moves to each board....

        www.duet3d.com

        o_lampeundefined zaptaundefined 3 Replies Last reply Reply Quote 1
        • o_lampeundefined
          o_lampe @T3P3Tony
          last edited by

          @t3p3tony said in New Raspberry Pi Zero 2W:

          Alternatively it might allow Klipper or similar to use Duet 3 expansion boards w/o a mainboard, they could implement the Duet CAN-FD protocol on the pi and send the planned moves to each board....

          That would be really great for slicing&pre-processing of multi-stream gcode

          T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
          • T3P3Tonyundefined
            T3P3Tony administrators @o_lampe
            last edited by

            @o_lampe neither of those is really specific to klipper though. slicing sits outside of the firmware used and if you are using a Pi then DSF allows you to intercept and modify the gcode.

            www.duet3d.com

            o_lampeundefined 1 Reply Last reply Reply Quote 0
            • o_lampeundefined
              o_lampe @T3P3Tony
              last edited by

              @t3p3tony I just wanted to point out, that an SBC can do so much more for us, then just display DWC.

              1 Reply Last reply Reply Quote 0
              • zaptaundefined
                zapta @T3P3Tony
                last edited by zapta

                @t3p3tony said in New Raspberry Pi Zero 2W:

                Alternatively it might allow Klipper or similar to use Duet 3 expansion boards w/o a mainboard, they could implement the Duet CAN-FD protocol on the pi and send the planned moves to each board....

                Does the duet main board send move commands over CAN in real time or does it just sync clocks and then send queued moves with target start time?

                The former will put hard realtime constrains on the SBC, the later is more relaxed.

                As for the Pico's PIOs, they are awesome. The stepper analyzer uses them to write to the display which achieves a significant boost. Typically they communicate with the software via hardware fifos that can be accessed programmatically or by DMA. For example, the MCU (there are two of them) can write the stepper pulse commands (e.g. interval and direction) to a double buffer and trigger a DMA to send them to the pio. Also, the the RP2040 are very cheap but like many other chips these days are hard to get.

                For CAN bus implementation, I would check in the Pico forums, they also have strong presence from the vendor. https://forums.raspberrypi.com/viewforum.php?f=143

                o_lampeundefined 1 Reply Last reply Reply Quote 0
                • o_lampeundefined
                  o_lampe @zapta
                  last edited by o_lampe

                  @zapta That's really good news about the PIOs. I hope we can gain enough interest and gather some SW-experts to make the best possible gadget.
                  I still hope it's not all CAN related, for the sake of Duet2 owners...

                  BTW: Berrybase.de still has almost 20.000 of them in stock.

                  1 Reply Last reply Reply Quote 0
                  • o_lampeundefined
                    o_lampe
                    last edited by

                    I played a bit with the Z2W and compared it with a RPi3b. They have the same cpu, but the Z2W constantly uses the swap-file in GUI mode.
                    I even had to increase the swap-size (default only 100MB)
                    The eMMC-uSD card I also bought, has no significant speed gain over class 10 SD card. (RPi4 benchmarks are much better)

                    My first impression: if you already have a RPi3 or better, and @PCR 's CAN-FD Hat will fit there too, there's no reason to spend extra money for a Z2W.
                    The Pico is still interesting as a low level CoPro. Time will tell...

                    1 Reply Last reply Reply Quote 0
                    • o_lampeundefined
                      o_lampe @T3P3Tony
                      last edited by

                      @t3p3tony said in New Raspberry Pi Zero 2W:

                      @PCR using that CAN-FD bus IC & transceiver with a Pi (either directly on a Pi 2/3/4, or using a 2040 + USB to a PC) could certainly allow for bus monitoring and protocol diagnosis, independent of using an oscilloscope so that could be interesting.

                      I read more about Pico's PIO state machines and there is a sample code about a logic analyzer (16 channel IIRC). Just thought it was worth mentioning it in this context.

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

                        While the PIO state machines look very useful, the amount of instruction memory (32 instructions) and scratchpad memory (2x 32 bits) are nothing like enough to implement a protocol with the complexity of CAN-FD.

                        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

                        o_lampeundefined zaptaundefined 2 Replies Last reply Reply Quote 0
                        • o_lampeundefined
                          o_lampe @dc42
                          last edited by

                          @dc42 I felt the same, when I studied the CanHack.py program. So we'd need both Can chips to make it work.

                          1 Reply Last reply Reply Quote 0
                          • zaptaundefined
                            zapta @dc42
                            last edited by

                            @dc42 said in New Raspberry Pi Zero 2W:

                            While the PIO state machines look very useful, the amount of instruction memory (32 instructions) and scratchpad memory (2x 32 bits) are nothing like enough to implement a protocol with the complexity of CAN-FD.

                            @dc42, I am not familiar with CAN bus. What does the PIO need to do other than serializing bits in/out or detect collisions? Those PIO instructions are very capable (they have multiple fields and can do a few things in one instructions) and work well with the the hardware FIFOs, DMAs, and MCU interrupts.

                            o_lampeundefined dc42undefined 2 Replies Last reply Reply Quote 0
                            • o_lampeundefined
                              o_lampe @zapta
                              last edited by o_lampe

                              @zapta The CanHack program lists many subroutines for testing and demonstration purposes and some real life routines. They are usually only a few lines of code. In C++ they might even be more compact.
                              But for compatibility reasons beween Pico(with state machines) and Z2W(no state machines), the Can-Hat should have both Can chips anyway...

                              zaptaundefined 1 Reply Last reply Reply Quote 0
                              • zaptaundefined
                                zapta @o_lampe
                                last edited by

                                @o_lampe, I see here two pdf schemas, one with a can controller and one with just the transceiver. What's the difference between them? Can the one without the MCP2518FD still support CAN functionality? Why two versions?

                                https://github.com/kentindell/canhack/tree/master/pico

                                o_lampeundefined 1 Reply Last reply Reply Quote 0
                                • o_lampeundefined
                                  o_lampe @zapta
                                  last edited by

                                  @zapta I'm no CAN expert either, but it seems it has some FiFo buffers, filters and CRC check of the SPI bus. The 40MHz crystal is another feature for better CAN-performance and reliability.
                                  CAN-chip.jpg

                                  1 Reply Last reply Reply Quote 0
                                  • o_lampeundefined o_lampe referenced this topic
                                  • o_lampeundefined
                                    o_lampe
                                    last edited by

                                    @ALL
                                    there's a dual CAN-FD Hat for RPi from Seeedstudio
                                    Does anyone see a reason, why this wouldn't work for SBC-purposes? (pins or I/O channels already in use)

                                    @PCR
                                    would it still make sense to design our own version?

                                    jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                    • jay_s_ukundefined
                                      jay_s_uk @o_lampe
                                      last edited by

                                      @o_lampe the raspberry pi shield might be a way to add CAN-FD in setups where it's not natively available, such as duet 2 + SBC and the STM/LPC port

                                      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                                      PCRundefined o_lampeundefined 3 Replies Last reply Reply Quote 0
                                      • PCRundefined
                                        PCR @jay_s_uk
                                        last edited by

                                        @jay_s_uk Yep problem is that the Shield is using SPI i think?

                                        o_lampeundefined 1 Reply Last reply Reply Quote 0
                                        • o_lampeundefined
                                          o_lampe @jay_s_uk
                                          last edited by o_lampe

                                          @jay_s_uk said in New Raspberry Pi Zero 2W:

                                          the STM/LPC port

                                          The super8 has a Can-Port, but it's not (yet) supported? OTOH, I wouldn't know how to link a RPi?

                                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                                          • jay_s_ukundefined
                                            jay_s_uk @o_lampe
                                            last edited by

                                            @o_lampe it does but it's only CAN over serial for the klipper guys

                                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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