Skip to content

Commit fd8afc7

Browse files
authored
Merge pull request hathach#1454 from Iktek/bugfix_1453
overwrite grstctl on edpt_disable
2 parents 9352f75 + 6e7cd22 commit fd8afc7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/portable/synopsys/dwc2/dcd_dwc2.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,8 +819,7 @@ static void dcd_edpt_disable (uint8_t rhport, uint8_t ep_addr, bool stall)
819819
}
820820

821821
// Flush the FIFO, and wait until we have confirmed it cleared.
822-
dwc2->grstctl |= (epnum << GRSTCTL_TXFNUM_Pos);
823-
dwc2->grstctl |= GRSTCTL_TXFFLSH;
822+
dwc2->grstctl = ((epnum << GRSTCTL_TXFNUM_Pos) | GRSTCTL_TXFFLSH);
824823
while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {}
825824
}
826825
else

0 commit comments

Comments
 (0)