From a3f1c269e9f16d86e82862be09d119a882b059c4 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 11 Sep 2019 18:02:27 +0700 Subject: added stm32f767nucleo board, board_test works --- src/tusb_option.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/tusb_option.h b/src/tusb_option.h index dc76ce5f6..eccb4245c 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -52,11 +52,13 @@ #define OPT_MCU_SAMD51 201 ///< MicroChip SAMD51 // ST Synopsis OTG devices -#define OPT_MCU_STM32F4 300 ///< ST STM32F4 -#define OPT_MCU_STM32F3 301 ///< ST STM32F0x0 -#define OPT_MCU_STM32H7 302 ///< ST STM32H7 -#define OPT_MCU_STM32F0 303 ///< ST STM32F0 -#define OPT_MCU_STM32F1 304 ///< ST STM32F1 +#define OPT_MCU_STM32F0 300 ///< ST STM32F0 +#define OPT_MCU_STM32F1 301 ///< ST STM32F1 +#define OPT_MCU_STM32F2 302 ///< ST STM32F2 +#define OPT_MCU_STM32F3 303 ///< ST STM32F3 +#define OPT_MCU_STM32F4 304 ///< ST STM32F4 +#define OPT_MCU_STM32F7 305 ///< ST STM32F7 +#define OPT_MCU_STM32H7 306 ///< ST STM32H7 /** @} */ -- cgit v1.3.1 From 7f166d860deb3da6d538fe356c026446cb2d48e1 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 11 Sep 2019 21:34:04 +0700 Subject: stm32f7 work with dcd synopsis close #124 --- README.md | 2 +- docs/boards.md | 1 + src/portable/st/synopsys/dcd_synopsys.c | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/README.md b/README.md index d6aed0b57..9a5cc3af9 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ The stack supports the following MCUs - **Nordic:** nRF52840 - **NXP:** LPC11Uxx, LPC13xx, LPC175x_6x, LPC177x_8x, LPC18xx, LPC40xx, LPC43xx, LPC51Uxx - **MicroChip:** SAMD21, SAMD51 (device only) -- **ST:** STM32F0, STM32F3, STM32F4, STM32H7 (device only) +- **ST:** STM32F0, STM32F3, STM32F4, STM32F7, STM32H7 (device only) [Here is the list of supported Boards](docs/boards.md) diff --git a/docs/boards.md b/docs/boards.md index 8cb22788a..48cb333b9 100644 --- a/docs/boards.md +++ b/docs/boards.md @@ -47,6 +47,7 @@ This code base already had supported for a handful of following boards - [STM32F407vg Discovery](https://www.st.com/en/evaluation-tools/stm32f4discovery.html) - [STM32F411ve Discovery](https://www.st.com/en/evaluation-tools/32f411ediscovery.html) - [STM32F412zg Discovery](https://www.st.com/en/evaluation-tools/32f412gdiscovery.html) +- [Nucleo STM32F767zi](https://www.st.com/en/evaluation-tools/nucleo-f767zi.html) - [Nucleo H743zi](https://www.st.com/en/evaluation-tools/nucleo-h743zi.html) ## Add your own board diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index 57f01d1ac..56660643d 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -28,20 +28,28 @@ #include "tusb_option.h" #if TUSB_OPT_DEVICE_ENABLED && ( CFG_TUSB_MCU == OPT_MCU_STM32F4 || \ - CFG_TUSB_MCU == OPT_MCU_STM32H7 ) + CFG_TUSB_MCU == OPT_MCU_STM32H7 || \ + CFG_TUSB_MCU == OPT_MCU_STM32F7) +// TODO Support OTG_HS +// EP_MAX : Max number of bi-directional endpoints including EP0 +// EP_FIFO_SIZE : Size of dedicated USB SRAM #if CFG_TUSB_MCU == OPT_MCU_STM32F4 #include "stm32f4xx.h" - // TODO Merge with OTG_HS - // Max endpoints for each direction + #define EP_MAX USB_OTG_FS_MAX_IN_ENDPOINTS #define EP_FIFO_SIZE USB_OTG_FS_TOTAL_FIFO_SIZE #elif CFG_TUSB_MCU == OPT_MCU_STM32H7 #include "stm32h7xx.h" - // TODO There is no equivalent macro for max endpoints in H7 header. - #define EP_MAX 8 + + #define EP_MAX 9 #define EP_FIFO_SIZE 4096 // TODO The official name of the USB FS peripheral on H7 is "USB2_OTG_FS". +#else + #include "stm32f7xx.h" + + #define EP_MAX 6 + #define EP_FIFO_SIZE 1280 #endif #include "device/dcd.h" -- cgit v1.3.1