summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorRavi Chandra Sadineni <ravisadineni@chromium.org>2019-10-27 16:05:38 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-31 00:08:09 +0000
commitb64ff5df1f93d5233cc257d08e451d71c5522d11 (patch)
tree3b687c8fa9c0acf544b8d3bf07379cef941a0786 /board
parente0f25be8962020e9836790ee2078720f16191238 (diff)
downloadchrome-ec-b64ff5df1f93d5233cc257d08e451d71c5522d11.tar.gz
hatch_fp: Configure unused GPIO pins.
By default, STM32F4 pins are configured as inputs, except some JTAG pins which can impact the power consumption of the device in different power modes because pins are very sensitive to external noise in input mode I/O. To avoid extra I/O current, all pins should be configured as analog input (AIN); in this mode the Schmitt trigger input is disabled, providing zero consumption for each I/O pin. For more info please look at "USING STM32F4 MCU POWER MODES WITH BEST DYNAMIC EFFICIENCY"("AN4365") section 1.2.6 and STM32F412 reference manual section 7.3.12. BUG=b:130561737 BRANCH=None TEST=Flash bloonchipper and measure power before and after. fpenroll and fpmatch works fine. Change-Id: I85d76589be22b892c81680763cfb263746004a80 Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1883127 Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'board')
-rw-r--r--board/hatch_fp/gpio.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/board/hatch_fp/gpio.inc b/board/hatch_fp/gpio.inc
index 7a9dfd152f..757cdfaf52 100644
--- a/board/hatch_fp/gpio.inc
+++ b/board/hatch_fp/gpio.inc
@@ -21,6 +21,21 @@ GPIO(FP_RST_ODL, PIN(B,10), GPIO_OUT_HIGH)
GPIO(SPI2_NSS, PIN(B,12), GPIO_OUT_HIGH)
GPIO(USER_PRES_L, PIN(B, 9), GPIO_ODR_HIGH)
+/*
+ * Unused pins.
+ * Configuring unused pins as ANALOG INPUT to save power. For more info
+ * look at "USING STM32F4 MCU POWER MODES WITH BEST DYNAMIC EFFICIENCY"
+ * ("AN4365") section 1.2.6 and STM32F412 reference manual section 7.3.12.
+ */
+GPIO(UNUSED_PA2, PIN(A, 2), GPIO_ANALOG)
+GPIO(UNUSED_PA3, PIN(A, 3), GPIO_ANALOG)
+GPIO(UNUSED_PA8, PIN(A, 8), GPIO_ANALOG)
+GPIO(UNUSED_PC13, PIN(C, 13), GPIO_ANALOG)
+GPIO(UNUSED_PC14, PIN(C, 14), GPIO_ANALOG)
+GPIO(UNUSED_PC15, PIN(C, 15), GPIO_ANALOG)
+GPIO(UNUSED_PH0, PIN(H, 0), GPIO_ANALOG)
+GPIO(UNUSED_PH1, PIN(H, 1), GPIO_ANALOG)
+
UNIMPLEMENTED(ENTERING_RW)
/* USART1: PA9/PA10 */