Skip to content

Commit 94a16a8

Browse files
committed
Enable supply of GPIO port G on STM32L4xx
Enable VDDIO2 supply for 14 I/Os (Port G[15:2]) Signed-off-by: Frederic Pillon <[email protected]>
1 parent 7f1b336 commit 94a16a8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cores/arduino/stm32/PortNames.c

+5
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ GPIO_TypeDef *set_GPIO_Port_Clock(uint32_t port_idx) {
132132
#endif
133133
#if defined GPIOG_BASE
134134
case PortG:
135+
#if defined(STM32L4xx) && defined(PWR_CR2_IOSV)
136+
// Enable VDDIO2 supply for 14 I/Os (Port G[15:2])
137+
__HAL_RCC_PWR_CLK_ENABLE();
138+
HAL_PWREx_EnableVddIO2();
139+
#endif
135140
gpioPort = (GPIO_TypeDef *)GPIOG_BASE;
136141
__HAL_RCC_GPIOG_CLK_ENABLE();
137142
break;

0 commit comments

Comments
 (0)