diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-04-17 13:31:22 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-04-17 13:31:22 +0000 |
commit | 46389ab806fdc429ef215ca1b293ac14c95e9cd4 (patch) | |
tree | b0330bd56d762d0eb360e9f4559053ece224bad7 | |
parent | 6894388135c4efd41cb4a96b6dac396b94c64eb9 (diff) | |
download | ChibiOS-46389ab806fdc429ef215ca1b293ac14c95e9cd4.tar.gz ChibiOS-46389ab806fdc429ef215ca1b293ac14c95e9cd4.tar.bz2 ChibiOS-46389ab806fdc429ef215ca1b293ac14c95e9cd4.zip |
Reverted tentative fix in STM32 OTGv1 driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10159 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c | 10 |
1 files changed, 7 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 04425412e..519407b77 100644 --- a/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c +++ b/os/hal/ports/STM32/LLD/OTGv1/hal_usb_lld.c @@ -290,6 +290,12 @@ static void otg_rxfifo_handler(USBDriver *usbp) { break;
case GRXSTSP_OUT_DATA:
cnt = (sts & GRXSTSP_BCNT_MASK) >> GRXSTSP_BCNT_OFF;
+
+ if (cnt == 0) {
+ asm ("nop");
+ }
+
+
ep = (sts & GRXSTSP_EPNUM_MASK) >> GRXSTSP_EPNUM_OFF;
otg_fifo_read_to_buffer(usbp->otg->FIFO[0],
usbp->epc[ep]->out_state->rxbuf,
@@ -427,9 +433,7 @@ static void otg_epout_handler(USBDriver *usbp, usbep_t ep) { osp = usbp->epc[ep]->out_state;
/* A short packet always terminates a transaction.*/
-/* if (((osp->rxcnt % usbp->epc[ep]->out_maxsize) == 0) &&
- (osp->rxsize < osp->totsize)) {*/
- if (((otgp->oe[ep].DOEPTSIZ & DOEPTSIZ_PKTCNT_MASK) == 0) &&
+ if (((osp->rxcnt % usbp->epc[ep]->out_maxsize) == 0) &&
(osp->rxsize < osp->totsize)) {
/* In case the transaction covered only part of the total transfer
then another transaction is immediately started in order to
|