summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-01-25 13:00:41 +0100
committerHiFiPhile <[email protected]>2025-06-13 15:21:04 +0200
commite84efd2771858b9f00d78824ccf8b1fade5f103c (patch)
tree9d0131e0abf639a822ec7f08504196db25ff0ca0 /src/common
parente95973d3462cdacd165a4057632d46248ded7b8a (diff)
Add STM32 DWC2 cache support
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_mcu.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h
index 2ee2132bf..8b30c98cd 100644
--- a/src/common/tusb_mcu.h
+++ b/src/common/tusb_mcu.h
@@ -220,12 +220,23 @@
#define TUP_RHPORT_HIGHSPEED 1 // Port0: FS, Port1: HS
#endif
+ #define CFG_TUD_MEM_DCACHE_ENABLE_DEFAULT 1
+ #define CFG_TUH_MEM_DCACHE_ENABLE_DEFAULT 1
+ #define CFG_TUSB_MEM_DCACHE_LINE_SIZE 32
+
#elif TU_CHECK_MCU(OPT_MCU_STM32H7)
+ #include "stm32h7xx.h"
#define TUP_USBIP_DWC2
#define TUP_USBIP_DWC2_STM32
#define TUP_DCD_ENDPOINT_MAX 9
+ #if __CORTEX_M == 7
+ #define CFG_TUD_MEM_DCACHE_ENABLE_DEFAULT 1
+ #define CFG_TUH_MEM_DCACHE_ENABLE_DEFAULT 1
+ #define CFG_TUSB_MEM_DCACHE_LINE_SIZE 32
+ #endif
+
#elif TU_CHECK_MCU(OPT_MCU_STM32H5)
#define TUP_USBIP_FSDEV
#define TUP_USBIP_FSDEV_STM32
@@ -322,6 +333,10 @@
// MCU with on-chip HS Phy
#define TUP_RHPORT_HIGHSPEED 1
+ #define CFG_TUD_MEM_DCACHE_ENABLE_DEFAULT 1
+ #define CFG_TUH_MEM_DCACHE_ENABLE_DEFAULT 1
+ #define CFG_TUSB_MEM_DCACHE_LINE_SIZE 32
+
//--------------------------------------------------------------------+
// Sony
//--------------------------------------------------------------------+