git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4584 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-08-19 06:03:23 +00:00
parent 0023a97303
commit 851416ea9c
1 changed files with 2 additions and 1 deletions

View File

@ -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);