summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-10-18 15:25:57 +0700
committerGitHub <[email protected]>2023-10-18 15:25:57 +0700
commitdd588222c7a83ad2597d961dd576774aec884480 (patch)
treeafe72e33b37f58856cebf04ecf815ef824f19184
parent0ede159ad07cce17b81b2eb8eb4e63abd14df322 (diff)
parent1168e4e16343cc0a6d958899460f1b841624974f (diff)
Merge pull request #2265 from bencowperthwaite/master
STM32U5 HS Support
-rw-r--r--src/portable/synopsys/dwc2/dwc2_stm32.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/portable/synopsys/dwc2/dwc2_stm32.h b/src/portable/synopsys/dwc2/dwc2_stm32.h
index cb455bd90..aa77511fa 100644
--- a/src/portable/synopsys/dwc2/dwc2_stm32.h
+++ b/src/portable/synopsys/dwc2/dwc2_stm32.h
@@ -84,7 +84,17 @@
#elif CFG_TUSB_MCU == OPT_MCU_STM32U5
#include "stm32u5xx.h"
- #define USB_OTG_FS_PERIPH_BASE USB_OTG_FS_BASE
+ // NOTE: STM595/5A5/599/5A9 only have 1 USB port (with integrated HS PHY)
+ // USB_OTG_FS_BASE and OTG_FS_IRQn not defined
+ #if (! defined USB_OTG_FS)
+ #define USB_OTG_HS_PERIPH_BASE USB_OTG_HS_BASE
+ #define EP_MAX_HS 9
+ #define EP_FIFO_SIZE_HS 4096
+ #define USB_OTG_FS_PERIPH_BASE USB_OTG_HS_BASE
+ #define OTG_FS_IRQn OTG_HS_IRQn
+ #else
+ #define USB_OTG_FS_PERIPH_BASE USB_OTG_FS_BASE
+ #endif
#define EP_MAX_FS 6
#define EP_FIFO_SIZE_FS 1280