diff options
| author | gdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01> | 2018-12-16 07:52:19 +0000 | 
|---|---|---|
| committer | gdisirio <gdisirio@110e8d01-0319-4d1e-a829-52ad28d1bb01> | 2018-12-16 07:52:19 +0000 | 
| commit | b79f097e36d5656b18d9d1e7b5fbea14f692618f (patch) | |
| tree | 0b56c272320ab2ce92c39a27e8ae60f4b30563c8 /os/hal | |
| parent | f20ecc78178fc8cdfa682e100398c240224dbb4a (diff) | |
| download | ChibiOS-b79f097e36d5656b18d9d1e7b5fbea14f692618f.tar.gz ChibiOS-b79f097e36d5656b18d9d1e7b5fbea14f692618f.tar.bz2 ChibiOS-b79f097e36d5656b18d9d1e7b5fbea14f692618f.zip | |
Tentative fix for http://www.chibios.com/forum/viewtopic.php?f=35&t=4918&p=34444
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12471 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'os/hal')
| -rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c index 3ff3bc9f0..0357d1855 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c @@ -134,7 +134,9 @@ static const stm32_otg_params_t hsparams = {  static void otg_core_reset(USBDriver *usbp) {
    stm32_otg_t *otgp = usbp->otg;
 -  osalSysPolledDelayX(32);
 +  /* Wait AHB idle condition.*/
 +  while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
 +    ;
    /* Core reset and delay of at least 3 PHY cycles.*/
    otgp->GRSTCTL = GRSTCTL_CSRST;
 @@ -143,7 +145,7 @@ static void otg_core_reset(USBDriver *usbp) {    osalSysPolledDelayX(18);
 -  /* Wait AHB idle condition.*/
 +  /* Wait AHB idle condition again.*/
    while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
      ;
  }
 | 
