I’ve noticed that if measure the rise time of GPIO on a CM3+L in a carrier board, I get very different results. GPIO22 for example, manages <2ns, which seems inline with the electrical specification. But GPIO34 barely manages 12ns.
This is after controlling for parasitic capacitance, trace impedance and measurement error.
I see from http://www.mosaic-industries.com/embedded-systems/microcontroller-projects/raspberry-pi/gpio-pin-electrical-specifications that drive strength is controlled by enabling parallel drivers. But I don’t know if:
- This is specific to certain versions of the Pi.
- Whether this is under software control.
- Whether the pin mode limits/dictates the options. Is there some auto bandwidth control going on or something?
Pi.GPIO
I foundget_PAD(0) == (1,1,3)
,get_PAD(1) == (1,1,0)
andget_PAD(0) == (1,1,3)
. SinceGPIO34
is in group 1, I ranset_drive(1,3)
and rise time immediately dropped from 12ns to about 2.5ns. And that's despite the pin being configured for theSD1
function and in active use running the clock for the WiFi chip! Also, this is the mysterious missing documentation that seems to be otherwise hidden from view: https://www.scribd.com/doc/101830961/GPIO-Pads-Control2 – Heath Raftery Oct 25 '22 at 10:23dt-blob
for the CM3 doesn't contain a drive strength setting for any pin in bank 1, and the logic is to set the drive strength to the lowest acceptable setting. Hence why bank 1 is set to 0 on a CM3! This is easy for us to change, like demonstrated here for the RPi 3: https://github.com/raspberrypi/firmware/blob/master/extra/dt-blob.dts#L1167-L1172 – Heath Raftery Oct 26 '22 at 04:57