overwrite grstctl on edpt_disable

This commit is contained in:
Pascal Speck 2022-05-03 09:52:10 +02:00
parent 6ec5174d8b
commit f452ab745e
1 changed files with 1 additions and 1 deletions

View File

@ -796,7 +796,7 @@ static void dcd_edpt_disable (uint8_t rhport, uint8_t ep_addr, bool stall)
}
// Flush the FIFO, and wait until we have confirmed it cleared.
dwc2->grstctl |= (epnum << GRSTCTL_TXFNUM_Pos);
dwc2->grstctl = (epnum << GRSTCTL_TXFNUM_Pos);
dwc2->grstctl |= GRSTCTL_TXFFLSH;
while ( (dwc2->grstctl & GRSTCTL_TXFFLSH_Msk) != 0 ) {}
}