Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for STM32H7RSxx #2871

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/common/tusb_mcu.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,16 @@
#define TUP_USBIP_FSDEV_STM32
#define TUP_DCD_ENDPOINT_MAX 8

#elif TU_CHECK_MCU(OPT_MCU_STM32H7RS)
#define TUP_USBIP_DWC2
#define TUP_USBIP_DWC2_STM32

// FS has 6, HS has 9
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stm32h7rs has built-in HS PHY, we should add

#define TUP_RHPORT_HIGHSPEED    1

as well, since people will also prefer to use that port.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

#define TUP_DCD_ENDPOINT_MAX 9

// MCU with on-chip HS Phy
#define TUP_RHPORT_HIGHSPEED 1

//--------------------------------------------------------------------+
// Sony
//--------------------------------------------------------------------+
Expand Down
8 changes: 8 additions & 0 deletions src/portable/synopsys/dwc2/dwc2_stm32.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ extern "C" {
#define OTG_FS_IRQn OTG_HS_IRQn
#endif

#elif CFG_TUSB_MCU == OPT_MCU_STM32H7RS
#include "stm32h7rsxx.h"
#define EP_MAX_FS 6
#define EP_FIFO_SIZE_FS 1280

#define EP_MAX_HS 9
#define EP_FIFO_SIZE_HS 4096

#elif CFG_TUSB_MCU == OPT_MCU_STM32F7
#include "stm32f7xx.h"
#define EP_MAX_FS 6
Expand Down
1 change: 1 addition & 0 deletions src/tusb_option.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
#define OPT_MCU_STM32L5 314 ///< ST L5
#define OPT_MCU_STM32H5 315 ///< ST H5
#define OPT_MCU_STM32U0 316 ///< ST U0
#define OPT_MCU_STM32H7RS 317 ///< ST F7RS

// Sony
#define OPT_MCU_CXD56 400 ///< SONY CXD56
Expand Down
Loading