Copyright © 2015 STMicroelectronics
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:
Here is the list of references to user documents:
| 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 |
| 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 |
| 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 |
| Headline |
|---|
| Core |
| Fix potential corruption of Endpoints MaxPacketSize |
| HID Class |
| Fix potential buffer overflow |
| 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 |
| 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 |
| 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. |
| 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. |
| 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 |
| 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. |
| 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 |
| 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 |
| Headline |
|---|
| MSC Class: |
| usbh_msc.c: Fix MSC Get Ready Delay issue |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
| 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 |
Created