From 724307a8eb25acb34b4a14d80692197bc4f766be Mon Sep 17 00:00:00 2001 From: Maciej Kobus Date: Sun, 11 Aug 2024 22:10:14 +0200 Subject: [PATCH] Set GP7 to high impedance for a good measure --- src/picoboot.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/picoboot.c b/src/picoboot.c index a11b75d..df19f35 100644 --- a/src/picoboot.c +++ b/src/picoboot.c @@ -14,7 +14,8 @@ #include "picoboot.pio.h" #include "endian.h" -const uint PIN_LED = 25; // Status LED +const uint PIN_LED = 25; // Status LED +const uint PIN_LEGACY_DI = 7; extern const uint32_t __payload[]; extern const uint32_t __payload_end[]; @@ -58,6 +59,11 @@ void main() gpio_set_dir(PIN_LED, GPIO_OUT); gpio_put(PIN_LED, true); + // set legacy DI pin GP7 to high impedance state + gpio_init(PIN_LEGACY_DI); + gpio_set_dir(PIN_LEGACY_DI, GPIO_IN); + gpio_disable_pulls(PIN_LEGACY_DI); + size_t payload_size = validate_payload(); if (payload_size == SIZE_MAX) { while (true) {