Skip to content

Commit

Permalink
Set the Vddio2 Independent I/Os supply for the stm32L5xx soc.
Browse files Browse the repository at this point in the history
This bit is mandatory to use PG[15:2]. Especiually for LPUART1 TxRx pins.
This bit of the PWR CR2 is used to validate the V DDIO2 supply for
electrical and logical isolation purpose.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
  • Loading branch information
FRASTM committed Dec 9, 2020
1 parent ce17a50 commit 9514a7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libraries/SrcWrapper/src/stm32/pinmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ void pin_function(PinName pin, int function)
/* Enable GPIO clock */
GPIO_TypeDef *gpio = set_GPIO_Port_Clock(port);

#if defined (STM32L5xx)
/* validate the V DDIO2 supply for electrical and logical isolation purpose.*/
__HAL_RCC_PWR_CLK_ENABLE();
HAL_PWREx_EnableVddIO2();
#endif /* STM32L5xx */

#if defined(STM32MP1xx)
PERIPH_LOCK(gpio);
#endif
Expand Down

0 comments on commit 9514a7d

Please sign in to comment.