stm32/h7: Implemented handling for bringing up the 3.3V USB voltage supply

This commit is contained in:
dragonmux
2024-04-19 00:48:23 +01:00
committed by Piotr Esden-Tempski
parent c3d972632a
commit b622d4b555
2 changed files with 10 additions and 0 deletions

View File

@@ -245,6 +245,9 @@ void pwr_set_svos_scale(enum pwr_svos_scale scale);
* @param[in] scale Voltage scale value to set.
*/
void pwr_set_vos_scale(enum pwr_vos_scale scale);
/** Enable and bring up the VDD33USB power supply for the USB controller */
void pwr_enable_usb33(void);
/**@}*/

View File

@@ -161,3 +161,10 @@ void pwr_set_vos_scale(enum pwr_vos_scale scale) {
}
while (!(PWR_D3CR & PWR_D3CR_VOSRDY)); /* VOSRDY bit is same between D3CR and SRDCR. */
}
void pwr_enable_usb33(void)
{
PWR_CR3 |= PWR_CR3_USB33DEN;
while (!(PWR_CR3 & PWR_CR3_USB33RDY))
continue;
}