fix(dwc2): check those chips with 1.25KB fifo

This commit is contained in:
sakumisu
2024-05-15 23:07:46 +08:00
parent 5e6bd78f80
commit 8b805ee6d7

View File

@@ -631,6 +631,13 @@ int usb_dc_init(uint8_t busid)
}
}
/* xxx32 chips do not follow (USB_OTG_GLB->GHWCFG3 >> 16) if hsphy_type is zero, they use 1.25KB(320 DWORD) */
if ((hsphy_type == 0) && (fifo_num > 320)) {
USB_LOG_ERR("Your fifo config is larger than 320 , please check\r\n");
while (1) {
}
}
ret = dwc2_flush_txfifo(0x10U);
ret = dwc2_flush_rxfifo();