diff options
author | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-06-25 14:51:10 +0000 |
---|---|---|
committer | Rocco Marco Guglielmi <roccomarco.guglielmi@live.com> | 2016-06-25 14:51:10 +0000 |
commit | fe86aae1bf97d96ba38e9424d60593c4e7a5f252 (patch) | |
tree | 3a96a532b2c96065e47ddbdde93eb8b43ae50fd7 /os/hal/ports/STM32/STM32L4xx | |
parent | f7c23bcc06574b91f5ece441cd0449f7e553feca (diff) | |
download | ChibiOS-fe86aae1bf97d96ba38e9424d60593c4e7a5f252.tar.gz ChibiOS-fe86aae1bf97d96ba38e9424d60593c4e7a5f252.tar.bz2 ChibiOS-fe86aae1bf97d96ba38e9424d60593c4e7a5f252.zip |
Edits to USB_CDC demo. Added USB voltage validation in hal_lld.c (still not backported)
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9663 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/STM32L4xx')
-rw-r--r-- | os/hal/ports/STM32/STM32L4xx/hal_lld.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/os/hal/ports/STM32/STM32L4xx/hal_lld.c b/os/hal/ports/STM32/STM32L4xx/hal_lld.c index 730629c86..76433073c 100644 --- a/os/hal/ports/STM32/STM32L4xx/hal_lld.c +++ b/os/hal/ports/STM32/STM32L4xx/hal_lld.c @@ -111,6 +111,13 @@ void hal_lld_init(void) { #if STM32_PVD_ENABLE
PWR->CR1 |= PWR_CR1_PVDE | (STM32_PLS & STM32_PLS_MASK);
#endif /* STM32_PVD_ENABLE */
+
+ /* Validating USB VDD.*/
+#if HAL_USE_USB
+ PWR->CR2 = PWR_CR2_USV;
+#else
+ PWR->CR2 = 0;
+#endif /* STM32_PVD_ENABLE */
}
/**
|