Fixed bug #497.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6923 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
dd4f3da00e
commit
643b4167f4
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue