git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6403 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
289c938273
commit
655de2175f
|
@ -112,11 +112,15 @@ static const stm32_otg_params_t hsparams = {
|
|||
static void otg_core_reset(USBDriver *usbp) {
|
||||
stm32_otg_t *otgp = usbp->otg;
|
||||
|
||||
halPolledDelay(32);
|
||||
|
||||
/* Core reset and delay of at least 3 PHY cycles.*/
|
||||
otgp->GRSTCTL = GRSTCTL_CSRST;
|
||||
while ((otgp->GRSTCTL & GRSTCTL_CSRST) != 0)
|
||||
;
|
||||
osalSysPolledDelayX(12);
|
||||
|
||||
halPolledDelay(12);
|
||||
|
||||
/* Wait AHB idle condition.*/
|
||||
while ((otgp->GRSTCTL & GRSTCTL_AHBIDL) == 0)
|
||||
;
|
||||
|
|
Loading…
Reference in New Issue