git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4581 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
4871d5b035
commit
cd31eec2cf
|
@ -830,15 +830,6 @@ void usb_lld_start(USBDriver *usbp) {
|
||||||
/* Enables IRQ vector.*/
|
/* Enables IRQ vector.*/
|
||||||
nvicEnableVector(STM32_OTG1_NUMBER,
|
nvicEnableVector(STM32_OTG1_NUMBER,
|
||||||
CORTEX_PRIORITY_MASK(STM32_USB_OTG1_IRQ_PRIORITY));
|
CORTEX_PRIORITY_MASK(STM32_USB_OTG1_IRQ_PRIORITY));
|
||||||
|
|
||||||
/* Creates the hauler threads in a suspended state. Note, it is
|
|
||||||
created only once, the first time @p usbStart() is invoked.*/
|
|
||||||
if (usbp->thd_ptr == NULL)
|
|
||||||
usbp->thd_ptr = usbp->thd_wait = chThdCreateI(usbp->wa_pump,
|
|
||||||
sizeof usbp->wa_pump,
|
|
||||||
STM32_USB_THREAD_PRIORITY,
|
|
||||||
usb_lld_pump,
|
|
||||||
usbp);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if STM32_USB_USE_OTG2
|
#if STM32_USB_USE_OTG2
|
||||||
|
@ -850,6 +841,8 @@ void usb_lld_start(USBDriver *usbp) {
|
||||||
/* Enables IRQ vector.*/
|
/* Enables IRQ vector.*/
|
||||||
nvicEnableVector(STM32_OTG2_NUMBER,
|
nvicEnableVector(STM32_OTG2_NUMBER,
|
||||||
CORTEX_PRIORITY_MASK(STM32_USB_OTG2_IRQ_PRIORITY));
|
CORTEX_PRIORITY_MASK(STM32_USB_OTG2_IRQ_PRIORITY));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Creates the hauler threads in a suspended state. Note, it is
|
/* Creates the hauler threads in a suspended state. Note, it is
|
||||||
created only once, the first time @p usbStart() is invoked.*/
|
created only once, the first time @p usbStart() is invoked.*/
|
||||||
|
@ -859,8 +852,6 @@ void usb_lld_start(USBDriver *usbp) {
|
||||||
STM32_USB_THREAD_PRIORITY,
|
STM32_USB_THREAD_PRIORITY,
|
||||||
usb_lld_pump,
|
usb_lld_pump,
|
||||||
usbp);
|
usbp);
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* - Forced device mode.
|
/* - Forced device mode.
|
||||||
- USB turn-around time = TRDT_VALUE.
|
- USB turn-around time = TRDT_VALUE.
|
||||||
|
@ -873,12 +864,12 @@ void usb_lld_start(USBDriver *usbp) {
|
||||||
/* PHY enabled.*/
|
/* PHY enabled.*/
|
||||||
otgp->PCGCCTL = 0;
|
otgp->PCGCCTL = 0;
|
||||||
|
|
||||||
/* Soft core reset.*/
|
|
||||||
otg_core_reset(otgp);
|
|
||||||
|
|
||||||
/* Internal FS PHY activation.*/
|
/* Internal FS PHY activation.*/
|
||||||
otgp->GCCFG = GCCFG_PWRDWN;
|
otgp->GCCFG = GCCFG_PWRDWN;
|
||||||
|
|
||||||
|
/* Soft core reset.*/
|
||||||
|
otg_core_reset(otgp);
|
||||||
|
|
||||||
/* Interrupts on TXFIFOs half empty.*/
|
/* Interrupts on TXFIFOs half empty.*/
|
||||||
otgp->GAHBCFG = 0;
|
otgp->GAHBCFG = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue