From ec52057efc25d6f2d31f3f56af8e499874ce8be7 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Wed, 5 Jul 2023 09:39:43 +0200 Subject: [PATCH] pkg/tinyusb/hw/hw_stm32_otg: set V_DDUSB for U5 --- pkg/tinyusb/hw/hw_stm32_otg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/tinyusb/hw/hw_stm32_otg.c b/pkg/tinyusb/hw/hw_stm32_otg.c index 3f1916088e..115ea26e63 100644 --- a/pkg/tinyusb/hw/hw_stm32_otg.c +++ b/pkg/tinyusb/hw/hw_stm32_otg.c @@ -37,6 +37,11 @@ static int tinyusb_hw_init_dev(const dwc2_usb_otg_fshs_config_t *conf) PWR->CR2 |= PWR_CR2_USV; #endif /* PWR_CR2_USV */ +#if defined(PWR_SVMCR_USV) + /* on U5: Validate USB Supply */ + PWR->SVMCR |= PWR_SVMCR_USV; +#endif /* PWR_SVMCR_USV */ + /* Enable the clock to the peripheral */ periph_clk_en(conf->ahb, conf->rcc_mask);