Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updating numbered headings

...

This application note explains how to use the STM32H7 USB Host Mode in FreeRTOS.

1. Understanding USB Host Mode Interfaces

1.1. FreeRTOS USB Host Mode Implementation

The STM32CubeH7 software layers provides the necessary drivers for USB host on the STM32H7. The drivers and corresponding clock and pads configurations code are enabled in the BSP.

The FreeRTOS demo application enables the USB Mass Storage functionality with support for the FAT filesystem support. The USB Mass Storage and FAT filesystem drivers are also provided by the STM32CubeH7 layer.

1.2. FreeRTOS USB Host Mode C-Binding API

The FreeRTOS BSP provides the following APIs to access directories and files on a USB Flash device:

...

The full description of the FAT file system API and data structures can be found in Middlewares/Third_Party/FatFs/Src/ff.h in the project source code directory.

2. USB Host Mode CLI Command

The FreeRTOS application implements the following USB Host mode related CLI command::

Command

Description

Comments

usbfatls

Print content of the top directory and its subdirectories

3. Validating USB Host Mode Operation

Use the following step-wise procedure to validate the USB Host mode operation:

...