From b9f689adf407a0062c2d5d0e27883f2e978716b1 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 8 Feb 2023 16:18:45 -0600 Subject: [PATCH] Use lowest drive level for PIO --- ports/raspberrypi/common-hal/rp2pio/StateMachine.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index ecaee90cc2..e9cb3d34bb 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -289,6 +289,11 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, } pio_gpio_init(self->pio, pin_number); } + + // Use lowest drive level for all State Machine outputs. (#7515 + // workaround). Remove if/when Pin objects get a drive_strength + // property and use that value instead. + gpio_set_drive_strength(pin_number, GPIO_DRIVE_STRENGTH_2MA); } pio_sm_config c = {0, 0, 0};