From 05160f9c2adc372f09ea4b7d1213a2ba8327a003 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 31 Mar 2023 12:10:22 +0200 Subject: [PATCH 1/2] boards/stm32f429-disc*: do not use periph_usbdev_hs The board uses the USB OTG HS peripheral together with the on-hip FS PHY. Using the `periph_usbdev_hs` module increases the EP data size for the CDC ECM bulk endpoint to 512 bytes, which does not work for the FS interface. Module `periph_usbdev_hs` is therefore not used. --- boards/common/stm32/include/cfg_usb_otg_hs_phy_fs.h | 2 +- boards/stm32f429i-disc1/Kconfig | 3 --- boards/stm32f429i-disc1/Makefile.dep | 4 ---- boards/stm32f429i-disc1/Makefile.features | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/boards/common/stm32/include/cfg_usb_otg_hs_phy_fs.h b/boards/common/stm32/include/cfg_usb_otg_hs_phy_fs.h index aa3e77cfeb0a..6e2b2b63e1d7 100644 --- a/boards/common/stm32/include/cfg_usb_otg_hs_phy_fs.h +++ b/boards/common/stm32/include/cfg_usb_otg_hs_phy_fs.h @@ -36,7 +36,7 @@ extern "C" { #define DWC2_USB_OTG_HS_ENABLED /** - * @brief Common USB OTG FS configuration + * @brief Common USB OTG HS configuration with on-chip FS PHY */ static const dwc2_usb_otg_fshs_config_t dwc2_usb_otg_fshs_config[] = { { diff --git a/boards/stm32f429i-disc1/Kconfig b/boards/stm32f429i-disc1/Kconfig index 33303137a9e9..ff05e0293ca8 100644 --- a/boards/stm32f429i-disc1/Kconfig +++ b/boards/stm32f429i-disc1/Kconfig @@ -20,7 +20,6 @@ config BOARD_STM32F429I_DISC1 select HAS_PERIPH_TIMER select HAS_PERIPH_UART select HAS_PERIPH_USBDEV - select HAS_PERIPH_USBDEV_HS # Put other features for this board (in alphabetical order) select HAS_RIOTBOOT @@ -39,6 +38,4 @@ config BOARD_STM32F429I_DISC1 select HAVE_I3G4250D select HAVE_L3GD20 - select MODULE_PERIPH_USBDEV_HS if MODULE_PERIPH_USBDEV - source "$(RIOTBOARD)/common/stm32/Kconfig" diff --git a/boards/stm32f429i-disc1/Makefile.dep b/boards/stm32f429i-disc1/Makefile.dep index 18b88c76114e..1b5ae322af08 100644 --- a/boards/stm32f429i-disc1/Makefile.dep +++ b/boards/stm32f429i-disc1/Makefile.dep @@ -1,7 +1,3 @@ -ifneq (,$(filter periph_usbdev,$(USEMODULE))) - USEMODULE += periph_usbdev_hs -endif - ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul_gpio USEMODULE += l3gxxxx diff --git a/boards/stm32f429i-disc1/Makefile.features b/boards/stm32f429i-disc1/Makefile.features index 3ddc733cbfa2..8ce979e427ab 100644 --- a/boards/stm32f429i-disc1/Makefile.features +++ b/boards/stm32f429i-disc1/Makefile.features @@ -8,7 +8,6 @@ FEATURES_PROVIDED += periph_spi FEATURES_PROVIDED += periph_timer FEATURES_PROVIDED += periph_uart FEATURES_PROVIDED += periph_usbdev -FEATURES_PROVIDED += periph_usbdev_hs # Put other features for this board (in alphabetical order) FEATURES_PROVIDED += riotboot From 281db4bfa80e4911a3de2154722aad4bb2502d82 Mon Sep 17 00:00:00 2001 From: Gunar Schorcht Date: Fri, 31 Mar 2023 12:15:08 +0200 Subject: [PATCH 2/2] tests/usbus_cdc_ecm: blacklist stm32f429i-disco The board no longer uses the `periph_usbdev_hs` module. Therefore, the maximum number of EPs used is that of the USB OTG FS peripheral, which is only 4. This is not sufficient for this test application since the board uses `stdio_cdc_acm`. --- tests/usbus_cdc_ecm/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/usbus_cdc_ecm/Makefile b/tests/usbus_cdc_ecm/Makefile index fc1a96e1e41a..b25c9e769984 100644 --- a/tests/usbus_cdc_ecm/Makefile +++ b/tests/usbus_cdc_ecm/Makefile @@ -12,6 +12,7 @@ USEMODULE += ps # Boards that don't have enough endpoints to use CDC ACM together with CDC ECM ifeq (,$(filter stdio_%,$(filter-out stdio_cdc_acm,$(USEMODULE)))) BOARD_BLACKLIST += \ + stm32f429i-disco \ stm32f4discovery \ weact-f401cc \ weact-f401ce \