diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-08 13:14:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-08 13:14:52 +0000 |
commit | 643b4167f4cfc44984d4df4117c01f13a29d97a8 (patch) | |
tree | 86bc86121fb4b12412a641a18f608f498fb46889 | |
parent | dd4f3da00e64d44917e3d209f5a31f4c9f9a3305 (diff) | |
download | ChibiOS-643b4167f4cfc44984d4df4117c01f13a29d97a8.tar.gz ChibiOS-643b4167f4cfc44984d4df4117c01f13a29d97a8.tar.bz2 ChibiOS-643b4167f4cfc44984d4df4117c01f13a29d97a8.zip |
Fixed bug #497.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6923 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/usb_lld.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c index 83997cc18..e86268211 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/usb_lld.c @@ -817,17 +817,6 @@ void usb_lld_start(USBDriver *usbp) { usbp->txpending = 0;
-#if defined(_CHIBIOS_RT_)
- /* Creates the data pump threads in a suspended state. Note, it is
- created only once, the first time @p usbStart() is invoked.*/
- if (usbp->tr == NULL)
- usbp->tr = usbp->wait = chThdCreateI(usbp->wa_pump,
- sizeof usbp->wa_pump,
- STM32_USB_OTG_THREAD_PRIO,
- usb_lld_pump,
- usbp);
-#endif
-
/* - Forced device mode.
- USB turn-around time = TRDT_VALUE.
- Full Speed 1.1 PHY.*/
@@ -869,6 +858,17 @@ void usb_lld_start(USBDriver *usbp) { GINTMSK_ESUSPM */ | GINTMSK_SOFM;
otgp->GINTSTS = 0xFFFFFFFF; /* Clears all pending IRQs, if any. */
+#if defined(_CHIBIOS_RT_)
+ /* Creates the data pump thread. Note, it is created only once.*/
+ if (usbp->tr == NULL) {
+ usbp->tr = chThdCreateI(usbp->wa_pump, sizeof usbp->wa_pump,
+ STM32_USB_OTG_THREAD_PRIO,
+ usb_lld_pump, usbp);
+ chThdStartI(usbp->tr);
+ chSchRescheduleS();
+ }
+#endif
+
/* Global interrupts enable.*/
otgp->GAHBCFG |= GAHBCFG_GINTMSK;
}
|