From bfd3b1b7689b2ef1c45a88572f18b04c4bd8fe6c Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Thu, 27 Dec 2018 20:31:31 -0800 Subject: [PATCH] Set 1V8 enable state before configuring pin function or to output mode ...to avoid glitching 1V8 enable voltage. --- firmware/common/hackrf_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/common/hackrf_core.c b/firmware/common/hackrf_core.c index b17bee7e..d1842557 100644 --- a/firmware/common/hackrf_core.c +++ b/firmware/common/hackrf_core.c @@ -781,8 +781,6 @@ void pin_setup(void) { scu_pinmux(SCU_PINMUX_LED4, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION4); #endif - scu_pinmux(SCU_PINMUX_EN1V8, SCU_GPIO_NOPULL); - /* Configure USB indicators */ #ifdef JAWBREAKER scu_pinmux(SCU_PINMUX_USB_LED0, SCU_CONF_FUNCTION3); @@ -796,7 +794,9 @@ void pin_setup(void) { gpio_output(&gpio_led[3]); #endif + disable_1v8_power(); gpio_output(&gpio_1v8_enable); + scu_pinmux(SCU_PINMUX_EN1V8, SCU_GPIO_NOPULL | SCU_CONF_FUNCTION0); #ifdef HACKRF_ONE /* Safe state: start with VAA turned off: */