Skip to main content
Visitor II
July 3, 2026
Question

STM32Cube USB Host Library CPU time utilization seems too high

  • July 3, 2026
  • 0 replies
  • 3 views

My MCU is STM32H753 on custom PCB. It is running at 480 Mhz. 

I use USB USB_OTG_FS it is clocked by RC48.

On “Middleware and Software packs” I have enabled “FATFS”, “FREERTOS” and “USB_HOST”

I generated project by using CubeMX 6.17 with “STM32Cube_FW_H7_V1.13.0”.

For more details see attached pictures with configurations.

 

I use FreeRTOS function uxTaskGetSystemState to get info about CPU time per task.

In my project I have FatFS test module that performs some read write tests. 

When I check CPU usage I get this numbers for tasks: 

  1. “fatfs_test” CPU: 43%
  2. “USBH_Queue” CPU: 46%
  3. left 11% are utilized by GUI.

I ran tests with USB DMA enabled and disabled - there is no difference. 

So, the question is: Is it OK for “USBH_Queue” task to utilize that much CPU when read/write operations in progress???

 

For example I have similar test for SD-card, and I get this numbers for tasks: 

  1. “fatfs_test” CPU: 51%
  2. “IDLE” CPU: 35%
  3. GUI and other tasks CPU: 14%
USB OTG FS pins
USB OTG FS parameters
USB OTG FS NVIC Settings
USB HOST Parameters settings
USB HOST platform settings