summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2017-01-11 09:26:33 -0800
committerDamien George <damien.p.george@gmail.com>2017-01-12 17:27:28 +1100
commitaa5349639109741a29bb2bb7fa7365797604d02a (patch)
tree43dc65642bec9975bcf4ba9da1f55bd5549a392e
parente45035db5c297190eee18cefa3b91b36b9f0e32b (diff)
stmhal: Support PortG on STM32L476 and STM32L486.
-rw-r--r--stmhal/mphalport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/stmhal/mphalport.c b/stmhal/mphalport.c
index 6893701f5..a9812362b 100644
--- a/stmhal/mphalport.c
+++ b/stmhal/mphalport.c
@@ -110,6 +110,10 @@ 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)
+ // Port G pins 2 thru 15 are powered using VddIO2 on these MCUs.
+ HAL_PWREx_EnableVddIO2();
+ #endif
__GPIOG_CLK_ENABLE();
#endif
#ifdef __GPIOH_CLK_ENABLE