aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-19 06:03:23 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-19 06:03:23 +0000
commit851416ea9cb814044005167a1cfefb5704bc33d8 (patch)
tree022fb019a31f2ba45fbd3b0894bbf15b17065324 /os/hal/platforms
parent0023a97303eeaada945e1279b24cf21ef69d043d (diff)
downloadChibiOS-851416ea9cb814044005167a1cfefb5704bc33d8.tar.gz
ChibiOS-851416ea9cb814044005167a1cfefb5704bc33d8.tar.bz2
ChibiOS-851416ea9cb814044005167a1cfefb5704bc33d8.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4584 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms')
-rw-r--r--os/hal/platforms/STM32/OTGv1/usb_lld.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c
index 189cb1636..876c982cd 100644
--- a/os/hal/platforms/STM32/OTGv1/usb_lld.c
+++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c
@@ -103,6 +103,7 @@ static void otg_core_reset(stm32_otg_t *otgp) {
/* Wait AHB idle condition.*/
while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
;
+ halPolledDelay(12);
/* Core reset and delay of at least 3 PHY cycles.*/
otgp->GRSTCTL = GRSTCTL_CSRST;
while ((otgp->GRSTCTL & GRSTCTL_CSRST) != 0)
@@ -864,7 +865,7 @@ void usb_lld_start(USBDriver *usbp) {
otgp->PCGCCTL = 0;
/* Internal FS PHY activation.*/
- otgp->GCCFG = GCCFG_PWRDWN;
+ otgp->GCCFG = GCCFG_VBUSASEN | GCCFG_VBUSBSEN | GCCFG_PWRDWN;
/* Soft core reset.*/
otg_core_reset(otgp);