aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
authorNicolas Reinecke <nr@das-labor.org>2016-12-05 01:37:32 +0100
committerNicolas Reinecke <nr@das-labor.org>2016-12-05 11:47:32 +0100
commit546ac1d584b7b43cb05954164ea05431d2f00796 (patch)
tree0ccdd4c739e4e2953671f5d7f311b0dc99cfd237 /os/hal/ports/STM32/LLD
parentc7d33767e06000f9da3befd6a7954b82c42d080d (diff)
downloadChibiOS-Contrib-546ac1d584b7b43cb05954164ea05431d2f00796.tar.gz
ChibiOS-Contrib-546ac1d584b7b43cb05954164ea05431d2f00796.tar.bz2
ChibiOS-Contrib-546ac1d584b7b43cb05954164ea05431d2f00796.zip
STM32: fix USB HOST HS when cpu is in sleep mode
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
index 523f14d..8947490 100644
--- a/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
+++ b/os/hal/ports/STM32/LLD/USBHv1/hal_usbh_lld.c
@@ -1361,7 +1361,8 @@ static void _usbh_start(USBHDriver *usbh) {
if (&USBHD2 == usbh) {
#endif
/* OTG HS clock enable and reset.*/
- rccEnableOTG_HS(FALSE);
+ rccEnableOTG_HS(TRUE); // Enable HS clock when cpu is in sleep mode
+ rccDisableOTG_HSULPI(TRUE); // Disable HS ULPI clock when cpu is in sleep mode
rccResetOTG_HS();
otgp->GINTMSK = 0;