From b06e6616d40f29fa95e3c5bcbea78743fc2b1b51 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Fri, 4 Mar 2022 20:22:52 +0100 Subject: [PATCH] Fix missing ELRS GPIO configuration. GPIO pins need to be in INPUT mode before they can be read via IDR. The reason it's broken on the H7 is that the default gpio mode is ANALOG, not INPUT like it is on other MCUs, and that the busy pin is used before communication to the SX1280 and the busy wait function returns to early because the GPIO IDR bit is always 0 on the H7. i.e. not busy, when it is. It may also be broken on other MCUs prior to this. --- src/main/drivers/rx/rx_sx1280.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/drivers/rx/rx_sx1280.c b/src/main/drivers/rx/rx_sx1280.c index f8550d70ee..bf9a5cc5a4 100644 --- a/src/main/drivers/rx/rx_sx1280.c +++ b/src/main/drivers/rx/rx_sx1280.c @@ -208,6 +208,7 @@ bool sx1280Init(IO_t resetPin, IO_t busyPin) if (busyPin) { IOInit(busyPin, OWNER_RX_SPI_EXPRESSLRS_BUSY, 0); + IOConfigGPIO(busyPin, IOCFG_IN_FLOATING); } else { busyPin = IO_NONE; }