From 958b5510cb9ac913b30772ec248e0ffcd3827890 Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 27 Apr 2020 13:17:47 +0700 Subject: [PATCH] added comment for hw clearing TXFE --- src/portable/st/synopsys/dcd_synopsys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index b479930ed..4e0d6f8c4 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -679,7 +679,10 @@ static void handle_epin_ints(USB_OTG_DeviceTypeDef * dev, USB_OTG_INEndpointType // XFER FIFO empty if ( in_ep[n].DIEPINT & USB_OTG_DIEPINT_TXFE ) { - // DIEPINT's TXFE bit is read-only -> no need to clear + // DIEPINT's TXFE bit is read-only, software cannot clear it. + // It will only be cleared by hardware when written bytes is more than + // - 64 bytes or + // - Half of TX FIFO size (configured by DIEPTXF) transmit_packet(xfer, &in_ep[n], n);