0

I'm working on a project with the RPi Pico that makes use of both the UARTs and has two LEDs attached to other random-ish GPIO pins. The LEDs will probably be turned on for the majority of time that the Pico is powered on.

I wish to add a mechanism to the firmware that lets the user configure the GPIO drive strength of the UARTs, as this should make certain baud rates more reliable through longer cables. However, I noticed that if I add the option to set both the TX and both the RX pins to 12mA, then we get a total of 48mA that may be used by all four of them at any given moment. Add the 2mA each LEDs on top, and we hit a total of 52mA of current at 3.3v that may flow out of the Pico's GPIO pins at any given moment.

This is above the maximum specified by the datasheet which is 50mA. I do not wish to damage the Pico or shorten its lifespan, so I want to make sure that setting 12mA drive strength on four of the UART pins along with other loads doesn't present a risk.

P.S. is there a real benefit to increasing drive strength to 12mA for UARTs or am I misunderstanding the effects it has? My understanding is that stronger drive strength produces cleaner, more square-like signals, which we need when dealing with baud rates as high as 3000000 (which my project will use).

1 Answer 1

1

You are misinterpreting the drive strength.

I am unaware of Pico documentation but the design is similar to Pi.

AFAIK the drive setting applies to all pins in the block - it is not an a per pin basis (certainly this is how the Pi works) - although the RP2040 documentation seems to suggest individual control, but I have never done this.

See GPIO PAD Control NOTE the settings on Pi4 enable a max of 7 mA, Pico 12 mA but the principle is the same.

What does the current value mean?

The current value specifies the maximum current under which the pad will still meet the specification.

  • It is not the current that the pad will deliver
  • It is not a current limit so the pad will not blow up

You also do not appear to understand current. No matter what drive strength you set each pin will only draw whatever current the load requires - indeed it is possible to exceed 50mA on a single pin (not recommended).

Frankly I doubt that changing the drive would produce any noticeable difference at a low speed such as 3MHz but if you want to drive very long lines you should use a buffer.

2
  • Ah, I see. But if you don’t mind answering this one as well, around what frequencies/baudrates does drive strength play a part in the reliability of the signal? Feb 5 at 23:49
  • 1
    @HackerDaGreat57 that is unanswerable as it depends on a lot external factors - mainly capacitance, load termination and the characteristics of the transmission line but 3MHz is not a high speed for modern electronics. When I used to design microprocessor circuitry (which operated in the 1MHz range) you could effectively ignore this but modern circuitry (which operates at > 100MHz) everything is a transmission line.
    – Milliways
    Feb 6 at 0:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.