From ea3b804edfa6f3be61ac03a5d13bc7c96ac6e548 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Tue, 27 Sep 2022 14:42:55 -0400 Subject: [PATCH] h1r9: workaround platform detection problem On the first spin of r9 one of the pins used for platform detection is pulled up to VAA, not VCC, and VAA hasn't been switched on yet at the time of platform detection. This results in r9 being misidentified as OG from time to time. As a temporary workaround until the next board spin, change the platform from OG to r9 if it is detected as OG but has r9 pin straps. --- firmware/common/platform_detect.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/firmware/common/platform_detect.c b/firmware/common/platform_detect.c index ee9b8d54..1cc6f479 100644 --- a/firmware/common/platform_detect.c +++ b/firmware/common/platform_detect.c @@ -198,6 +198,11 @@ void detect_hardware_platform(void) (adc0_3 == PIN_STRAP_LOW) && (adc0_4 == PIN_STRAP_LOW) && (platform == BOARD_ID_HACKRF1_R9)) { revision = BOARD_REV_HACKRF1_R9; + } else if ( //FIXME temporary + (adc0_3 == PIN_STRAP_LOW) && (adc0_4 == PIN_STRAP_LOW) && + (platform == BOARD_ID_HACKRF1_OG)) { + revision = BOARD_REV_HACKRF1_R9; + platform = BOARD_ID_HACKRF1_R9; } else { revision = BOARD_REV_UNRECOGNIZED; }