diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-10-26 11:12:01 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-10-26 11:12:01 +0000 |
commit | e523acf824d24a45c3194a191057e1ed8f87b75d (patch) | |
tree | be452257b75e049e26ab44e372513f343e716643 | |
parent | 6172fdfb71e9d65479f77dd6a01b6907293335de (diff) | |
download | ChibiOS-e523acf824d24a45c3194a191057e1ed8f87b75d.tar.gz ChibiOS-e523acf824d24a45c3194a191057e1ed8f87b75d.tar.bz2 ChibiOS-e523acf824d24a45c3194a191057e1ed8f87b75d.zip |
Fixed bug #786.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9879 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c | 12 | ||||
-rw-r--r-- | readme.txt | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c index 22ea69f31..52e44f011 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c @@ -414,11 +414,17 @@ static void otg_epout_handler(USBDriver *usbp, usbep_t ep) { /* Setup packets handling, setup packets are handled using a
specific callback.*/
_usb_isr_invoke_setup_cb(usbp, ep);
-
}
if ((epint & DOEPINT_XFRC) && (otgp->DOEPMSK & DOEPMSK_XFRCM)) {
- /* Receive transfer complete.*/
- USBOutEndpointState *osp = usbp->epc[ep]->out_state;
+ USBOutEndpointState *osp;
+
+ /* Receive transfer complete, checking if it is a SETUP transfer on EP0,
+ that it must be ignored, the STUPM handler will take care of it.*/
+ if ((ep == 0) && (usbp->ep0state == USB_EP0_WAITING_SETUP))
+ return;
+
+ /* OUT state structure pointer for this endpoint.*/
+ osp = usbp->epc[ep]->out_state;
/* A short packet always terminates a transaction.*/
if (((osp->rxcnt % usbp->epc[ep]->out_maxsize) == 0) &&
diff --git a/readme.txt b/readme.txt index c87ec5a18..cd2a3e3b9 100644 --- a/readme.txt +++ b/readme.txt @@ -147,6 +147,8 @@ - RT: Merged RT4.
- NIL: Merged NIL2.
- NIL: Added STM32F7 demo.
+- HAL: Fixed OTGv1 driver not functional on STM32L4 (bug #786)(backported
+ to 16.1.6).
- HAL: Fixed wrong bit offset in STM32F37x ADC_CR2_EXTSEL_SRC() macro
(bug #785)(backported to 16.1.6, 3.0.6).
- RT: Fixed tick-less mode can fail in RT for very large delays (bug #784)
|