From 4871d5b035ec259cbdd28cab052af81db0b6679e Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 18 Aug 2012 17:16:41 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4580 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/platforms/STM32/OTGv1/usb_lld.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/os/hal/platforms/STM32/OTGv1/usb_lld.c b/os/hal/platforms/STM32/OTGv1/usb_lld.c index e1f0ef833..40894a4c4 100644 --- a/os/hal/platforms/STM32/OTGv1/usb_lld.c +++ b/os/hal/platforms/STM32/OTGv1/usb_lld.c @@ -862,26 +862,26 @@ void usb_lld_start(USBDriver *usbp) { } #endif + /* - Forced device mode. + - USB turn-around time = TRDT_VALUE. + - Full Speed 1.1 PHY.*/ + otgp->GUSBCFG = GUSBCFG_FDMOD | GUSBCFG_TRDT(TRDT_VALUE) | GUSBCFG_PHYSEL; + + /* 48MHz 1.1 PHY.*/ + otgp->DCFG = 0x02200000 | DCFG_DSPD_FS11; + + /* PHY enabled.*/ + otgp->PCGCCTL = 0; + /* Soft core reset.*/ otg_core_reset(otgp); /* Internal FS PHY activation.*/ otgp->GCCFG = GCCFG_PWRDWN; - /* - Forced device mode. - - USB turn-around time = TRDT_VALUE. - - Full Speed 1.1 PHY.*/ - otgp->GUSBCFG = GUSBCFG_FDMOD | GUSBCFG_TRDT(TRDT_VALUE) | GUSBCFG_PHYSEL; - /* Interrupts on TXFIFOs half empty.*/ otgp->GAHBCFG = 0; - /* 48MHz 1.1 PHY.*/ - otgp->DCFG = 0x02200000 | DCFG_PFIVL(0) | DCFG_DSPD_FS11; - - /* PHY enabled.*/ - otgp->PCGCCTL = 0; - /* Endpoints re-initialization.*/ otg_disable_ep(otgp);