diff options
| author | sakumisu <[email protected]> | 2024-05-15 23:07:46 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2024-05-15 23:07:46 +0800 |
| commit | 8b805ee6d7915cda848a2df442ded2900de10eec (patch) | |
| tree | 04c83b79e524faf15b908798ddc2d3b6480e1b61 | |
| parent | 5e6bd78f802d524480c31ffd8f8807ec1a765693 (diff) | |
fix(dwc2): check those chips with 1.25KB fifo
| -rw-r--r-- | port/dwc2/usb_dc_dwc2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/port/dwc2/usb_dc_dwc2.c b/port/dwc2/usb_dc_dwc2.c index 4bdc5712..0a1f0d68 100644 --- a/port/dwc2/usb_dc_dwc2.c +++ b/port/dwc2/usb_dc_dwc2.c @@ -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(); |
