# Release Notes for STM32Cube USB Host Library

Copyright © 2015 STMicroelectronics

# Purpose

The USB host library comes on top of the STM32Cube™ USB host HAL driver and offers all the APIs required to develop an USB host application.

The main USB host library features are:

- Support of multi packet transfer features allowing the reception of big amount of data without splitting it into max packet size transfers.
- Support of most common USB Class drivers (HID, CDC, MSC, MTP, AUDIO1.0)
- Configuration files to interface with Cube HAL and change the library configuration without changing the library code (Read Only).
- 32-bits aligned data structures to handle DMA based transfer in High speed modes.

Here is the list of references to user documents:

- UM1720 : STM32Cube USB host library User Manual
- Wiki Page : STM32Cube USB Wiki Page

# Update History

V3.5.3 / 26-September-2024

## Main Changes

Headline
Core
Improve usage of CMSIS RTOS message queue
Add new API to allow activating USB host pipe from STM32 HAL
HID Class
Fix keyboard layout mapping for AZERTY keyboards
Add escape to Keyboard layouts mapping
MSC/CDC/MTP Classes
Allow re-activating host IN channel based on SOF timer to reduce NAK IT with some USB peripherals

V3.5.2 / 11-December-2023

## Main Changes

Headline
Core
Avoid infinite loop in case device descriptor length was wrongly set to zero
MSC Class
Add support of multi-LUN storage devices
Report error for non-ready media
Audio Class
Report error for unsupported audio sample rate

V3.5.1 / 10-January-2023

## Main Changes

Headline
Core
Ensure the number of endpoints parsed does not exceed defined USBH_MAX_NUM_ENDPOINTS
Use correct endpoint length for audio midi subclass devices
HID Class
Prevent buffer overflow during HID get descriptors

V3.5.0 / 05-August-2022

## Main Changes

Headline
Core
Fix potential corruption of Endpoints MaxPacketSize
HID Class
Fix potential buffer overflow

V3.4.1 / 04-April-2022

## Main Changes

Headline
Update the way to declare licenses
Fix code spelling and improve code style
HID Class
Modify some variables names to avoid duplication versus device for HID class

V3.4.0 / 23-April-2021

## Main Changes

Headline
Core driver:
Fixes added to free RTOS resource during USB host DeInit
CodeSpell and mcuAstlye fixes
Multiple MisraC 2012 fixes
All Classes:
CodeSpell and mcuAstlye fixes
Multiple MisraC 2012 fixes

V3.3.5 / 26-January-2021

## Main Changes

Headline
Core driver:
Improve enumeration phase by adding some specifications requirements checks.
Add error signaling for some out of specification device’s descriptors fields.
MSC Class:
usbh_msc.c: add checking on both IN and OUT pipes construction.
HID Class:
Fix wrong keyboard key defines.

V3.3.4 / 08-January-2020

## Main Changes

Headline
Core driver:
Improve enumeration phase and avoid silent responses.
Add device reset trial mechanism during enumeration phase.
MSC Class:
usbh_msc.c: update max_lun field to be uint8_t instead of uint32_t.
HID Class:
Get HID descriptor by parsing the device descriptor in order to improve interoperability with buggy devices that Stall host Get HID descriptor request.

V3.3.3 / 29-April-2019

## Main Changes

Headline
Fix misra-C 2012 high severity violations
Core driver:
usbh_core.c: Rework USB host Core process in order to improve Device connection / disconnection robustness
MSC Class:
usbh_msc.c: Update USBH_MSC_GetMaxLUN() to prevent corruption of supported LUNs
HID Class:
Prevent race between USB buffer and Application fifo buffer, this was ensured by allocating a dedicated buffer for received report
Prevent overflow on USB buffer for devices that could have report size greater than 4bytes

V3.3.2 / 24-January-2019

## Main Changes

Headline
Core driver:
usbh_core.c: fix on USBH_Deinit() API, prevent freeing pActiveClass->pData pointer during host Deinit, this is manged by the Class drivers.

V3.3.1 / 09-July-2018

## Main Changes

Headline
Fix interoperability issue with HP mouse
Add compatibility with FreeRTOS CMSIS V2 API changes
Update License section and add link to get copy of ST Ultimate Liberty license SLA0044

V3.3.0 / 23-January-2018

## Main Changes

Headline
Update license section to Ultimate Liberty
Update some functions to be MISRA-C 2004 compliant
Improve USB Core enumeration state machine
Fix Device fast plug/unplug issue
Improve interoperability with non compliant USB devices
Add support of Host set remote wakeup enable feature
Fix USB Host MSC set correct sector size
MSC: Set correct LUN number if returned LUN number exceeds max supported value

V3.2.2 / 07-July-2015

## Main Changes

Headline
MSC Class:
usbh_msc.c: Fix MSC Get Ready Delay issue

V3.2.1 / 26-June-2015

## Main Changes

Headline
Core driver:
usbh_def.h: update USBH_MAX_PIPES_NBR literal definition to be conditioned by #ifndef directive, to allow application code to change its value (i.e. in the compiler preprocessor)
MSC Class:
usbh_msc.c:
Update USBH_MSC_GetMaxLUN() to return the correct number of supported LUNs (was returning 0xFF)
Fix timeout calculation issue
usbh_msc.h:
update MAX_SUPPORTED_LUN literal definition to be conditioned by #ifndef directive, to allow application code to change its value (i.e.in the compiler preprocessor)
HID Class:
usbh_hid.h: fix HID’s handle “Timer” type to uint32_t instead of uint16_t
MTP Class:
usbh_mtp.c : Fix timeout calculation issue

V3.2.0 / 04-November-2014

## Main Changes

Headline
Update all drivers to be C++ compliant
Miscellaneous source code comments update
Core driver
usbh_core.c: remove HOST_IDLE state in USBH_LL_Connect() function
MSC class
Update to manage correctly older USB Keys that do not support GetMaxLun request

V3.1.0 / 19-June-2014

## Main Changes

Headline
Core driver
Add a new define USBH_PROCESS_STACK_SIZE in the usbh_conf.h file to change the default internal USB host process stack. Note that by omitting this define, the default stack size (2KB) is used
Add a user callback to handle unrecoverable error case in the application
Remove the wrong check on the interface descriptor index in the USBH_FindInterface() function
All classes
Update class description in files comment by adding reference to the used USB class specification revision
Audio, CDC and MTP classes
Add full RTOS support by handling state transitions through OS messages
HID class
Add new API USBH_HID_GetPollInterval() to allow user to retrieve the needed poll time (interval between two USBD_HID_SendReport())
Audio class
Add a new weak callback USBH_AUDIO_BufferEmptyCallback() to indicate the end of audio data processing on the user buffer
MSC class
Return mass storage device capacity in Bytes in the user log message instead of MBytes

V3.0.0 / 18-February-2014

## Main Changes

Headline
Major update based on STM32Cube specification: Library Core, Classes architecture and APIs modified vs. V2.1.0, and thus the 2 versions are not compatible.
This version has to be used only with STM32Cube based development

V2.1.0 / 19-March-2012

## Main Changes

Headline
Official support of STM32F4xx devices
All source files: license disclaimer text update and add link to the License file on ST Internet
Add ISR structure to link the low level driver to the Host library
Change length parameter in the I/O operations to handle large amount of data
Enhance the configuration descriptor parsing method to take into account multi interface devices
Miscellaneous bug fix
HID class
Remove blocking even frame synchronization loop
MSC class
Handle correctly the BOT transfer with length < max length
Handle multi sector length data in the FAT FS interface

V2.0.0 / 22-July-2011

## Main Changes

Headline
econd official version supporting STM32F105/7 and STM32F2xx devices
dd support for STM32F2xx devices
dd multi interface feature
dd dynamic configuration parsing
dd USBH_DeAllocate_AllChannel function in the Host channel management layer to clean up channels allocation table when de-initializing the library
hange the core layer to stop correctly the host core and free all allocated channels
dd usbh_conf.h file in the application layer to customize some user parameters

V1.0.0 / 29-November-2010

## Main Changes

Created