Skip to content

Commit 5e3cfe7

Browse files
committed
nrf5x: Fix endpoint internal state when closed
Field started (regardind transfer) was only cleaed when transfer was finished. For audio devices set interface is called many times. When there is no audio (silence) set interface requests zero lenght bandwithd that in turn calls dcd_edpt_close(). When endpoint is closed due to set interface request transfer should not longer be started since it will block next start transfer with assert. This just sets 'started' to false when endpoint is closed.
1 parent 101cbf6 commit 5e3cfe7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/portable/nordic/nrf5x/dcd_nrf5x.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ void dcd_edpt_close (uint8_t rhport, uint8_t ep_addr)
438438
// When both ISO endpoint are close there is no need for SOF any more.
439439
if (_dcd.xfer[EP_ISO_NUM][TUSB_DIR_IN].mps + _dcd.xfer[EP_ISO_NUM][TUSB_DIR_OUT].mps == 0) NRF_USBD->INTENCLR = USBD_INTENCLR_SOF_Msk;
440440
}
441+
_dcd.xfer[epnum][dir].started = false;
441442
__ISB(); __DSB();
442443
}
443444

0 commit comments

Comments
 (0)