Skip to content

Commit 8f85115

Browse files
committed
drivers: usb: device_stm32: fix maximum speed for usb_fs
update the definition of FULL_SPEED based on the presence of USB and USB_DRD_FS. Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
1 parent a1a92a2 commit 8f85115

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/device/usb_dc_stm32.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ static const struct gpio_dt_spec ulpi_reset =
9696
#define HIGH_SPEED USB_OTG_SPEED_HIGH
9797
#endif
9898

99+
#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_usb)
100+
#define FULL_SPEED PCD_SPEED_FULL
101+
#else
99102
#define FULL_SPEED USB_OTG_SPEED_FULL
103+
#endif
100104
/*
101105
* USB, USB_OTG_FS and USB_DRD_FS are defined in STM32Cube HAL and allows to
102106
* distinguish between two kind of USB DC. STM32 F0, F3, L0 and G4 series

0 commit comments

Comments
 (0)