Fixing an issue on IN ISOC errors handling.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15651 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2022-06-11 08:08:33 +00:00
parent 7e19d8f9fb
commit 89a0515d7d
1 changed files with 4 additions and 7 deletions

View File

@ -478,20 +478,17 @@ static void otg_isoc_in_failed_handler(USBDriver *usbp) {
for (ep = 0; ep <= usbp->otgparams->num_endpoints; ep++) {
if (((otgp->ie[ep].DIEPCTL & DIEPCTL_EPTYP_MASK) == DIEPCTL_EPTYP_ISO) &&
((otgp->ie[ep].DIEPCTL & DIEPCTL_EPENA) != 0)) {
/* Endpoint enabled -> ISOC IN transfer failed */
/* Disable endpoint */
/* Endpoint enabled -> ISOC IN transfer failed.*/
/* Disable endpoint.*/
otgp->ie[ep].DIEPCTL |= (DIEPCTL_EPDIS | DIEPCTL_SNAK);
while (otgp->ie[ep].DIEPCTL & DIEPCTL_EPENA)
;
/* Flush FIFO */
/* Flush FIFO.*/
otg_txfifo_flush(usbp, ep);
/* Prepare data for next frame */
/* Prepare data for next frame.*/
_usb_isr_invoke_in_cb(usbp, ep);
/* TX FIFO empty or emptying.*/
otg_txfifo_handler(usbp, ep);
}
}
}