Skip to content

Commit

Permalink
USB Host driver: add support for USB HS in FS mode (when using the in…
Browse files Browse the repository at this point in the history
…ternal PHY)
  • Loading branch information
andbararm authored Nov 14, 2024
1 parent 8d81e2c commit 643e6ed
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion ARM.CMSIS-Driver_STM32.pdsc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
- Corrected PMA configuration
- Added support for devices without Vbus sensing capability
- Updated GetFrameNumber function to always return 0 because of missing HAL support
USB Host driver:
- Added support for USB HS in FS mode (when using the internal PHY)
</release>
</releases>

Expand Down Expand Up @@ -171,7 +173,7 @@
<file category="source" name="Drivers/USBD_STM32.c"/>
</files>
</component>
<component Cvendor="Keil" Cclass="CMSIS Driver" Cgroup="USB Host" Capiversion="2.4.0" Cversion="2.0.0" condition="CMSIS Driver requirements">
<component Cvendor="Keil" Cclass="CMSIS Driver" Cgroup="USB Host" Capiversion="2.4.0" Cversion="2.1.0" condition="CMSIS Driver requirements">
<description>USB Host Driver for STM32 devices</description>
<RTE_Components_h> <!-- the following content goes into file 'RTE_Components.h' -->
#define RTE_Drivers_USBH0 /* Driver USBH0 */
Expand Down
8 changes: 5 additions & 3 deletions Drivers/USBH_STM32.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*
* -----------------------------------------------------------------------------
*
* $Date: 21. June 2024
* $Revision: V2.0
* $Date: 13. November 2024
* $Revision: V2.1
*
* Project: USB Host Driver for STMicroelectronics STM32 devices
*
Expand All @@ -29,6 +29,8 @@
# Revision History
- Version 2.1
- Added support for USB HS in FS mode (when using the internal PHY)
- Version 2.0
- Initial release
Expand Down Expand Up @@ -226,7 +228,7 @@ int32_t USBH_HW_VbusOnOff (HCD_HandleTypeDef *ptr_hhcd, bool vbus) {

// Driver Version **************************************************************
// CMSIS Driver API version , Driver version
static const ARM_DRIVER_VERSION driver_version = { ARM_DRIVER_VERSION_MAJOR_MINOR(2,4), ARM_DRIVER_VERSION_MAJOR_MINOR(2,0) };
static const ARM_DRIVER_VERSION driver_version = { ARM_DRIVER_VERSION_MAJOR_MINOR(2,4), ARM_DRIVER_VERSION_MAJOR_MINOR(2,1) };
// *****************************************************************************

// Driver Capabilities *********************************************************
Expand Down
5 changes: 3 additions & 2 deletions Drivers/USBH_STM32.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*
* -----------------------------------------------------------------------------
*
* $Date: 21. June 2024
* $Revision: V2.0
* $Date: 13. November 2024
* $Revision: V2.1
*
* Project: USB Host Driver header for STMicroelectronics STM32 devices
*
Expand Down Expand Up @@ -52,6 +52,7 @@ extern "C"
#endif

#if (defined(MX_USB_OTG_HS) && (defined(MX_USB_OTG_HS_Host_Only_FS) || \
defined(MX_USB_OTG_HS_Host_FS) || \
defined(MX_USB_OTG_HS_Host_HS)))
#define MX_USBH1 1
#define MX_USBH1_HANDLE MX_USB_OTG_HS_HANDLE
Expand Down

0 comments on commit 643e6ed

Please sign in to comment.