Comment by mrheosuper

Comment by mrheosuper 6 days ago

5 replies

I wish many manufactures would begin adding Pin mux inside MCU, like espressif. So most of the time you don't care which pin has which function, and make designing pcb for it much less painful.

gadgetoid 6 days ago

PIO kinda sorta does this but yeah the Pico could definitely benefit from a more flexible pin mux, since bringing up PIO peripherals is messy.

Pico never quite has a function where it’s needed.

jamesmunns 5 days ago

Nordic's nRF family is the major other vendor I've seen doing this, almost all peripheral can be on any pin. It's definitely a big help for designing boards.

iamflimflam1 6 days ago

Definitely - the ESP32S3 is an absolute joy to work with and layout.

  • franga2000 5 days ago

    How do you go about designing a PCB with this in mind though? At least in KiCad, the requirement to make nets first and layout last makes it so I basically have to do a draft layout in my head, connect the pins in the circuit diagram and then do the final layout.

    Do you have a better workflow for this?

    I'd love to have something that I can just feed a list of tags for each pin and have it pick the pins and make the layout in the fewest layers and/or with fewest vias possible (the latter would be amazing for making perfboard prototypes). Something like MCU_PIN1={uart1_tx,gpio_out,gpio_in,gpio_in_pullup...}, J2_PIN1={uart1_tx}, ... and then it just...figures it out and gives me pin table that I can use in the code (like a bunch of #defines).

    • iamflimflam1 2 days ago

      I will tend to do make the schematic. I’ll use labels for most connections from the mcu to any peripherals.

      On the PCB, the most critical thing to my mind, is component placement. I’ll do that before any wiring up and then use that to determine the most sensible GPIO pins to use.

      For the routing I’ll modify the pins used to make it easier/simpler.

      It’s definitely an iterative process with a lot of back and forth between schematic and PCB.

      The nice thing with the flexibility of the GPIOs is that I don’t need to do much upfront design. I’ll just label pins up in the schematic and if needed tear it up and redo.

      The real trick in the schematic is not “wiring” all the connections up. Just use labels that are easy to move around.