From 7e9121630cbea84e6312bf7d53bd9c2e4ace0a60 Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Wed, 11 Jan 2017 09:26:33 -0800 Subject: [PATCH] stmhal: Support PortG on SensorTile (STM32L476) --- stmhal/mphalport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/stmhal/mphalport.c b/stmhal/mphalport.c index 6893701f5666..d27f979404c6 100644 --- a/stmhal/mphalport.c +++ b/stmhal/mphalport.c @@ -110,6 +110,12 @@ void mp_hal_gpio_clock_enable(GPIO_TypeDef *gpio) { #endif #if defined(GPIOG) && defined(__GPIOG_CLK_ENABLE) } else if (gpio == GPIOG) { + #if defined(STM32L476xx) || defined(STM32L486xx) + // According to AN4555 (Getting started with STM32L4 series hardware + // development, Port G pins 2 thru 15 are powered using VddIO2 for the + // STM32L4x6 MCUs. + HAL_PWREx_EnableVddIO2(); + #endif __GPIOG_CLK_ENABLE(); #endif #ifdef __GPIOH_CLK_ENABLE