cancel
Showing results for 
Search instead for 
Did you mean: 

Help with USB MSC using USBX + FileX on STM32H573RIT6

VijayKushwah
Associate II

Subject: Help with USB MSC using USBX + FileX on STM32H573RIT6 (UX_ERROR during host_stack_initialize)

Hello ST Community,

I'm currently working on a project using the STM32H573RIT6, and I’m relatively new to this STM32H5 series. I’m trying to implement a USB MSC (Mass Storage Class) host using USBX with FileX, and I’m using STM32CubeMX for configuration and STM32CubeIDE for development.

Importantly, I’m working without any RTOS – this is a bare-metal (standalone) implementation, so I'm not using ThreadX or any other RTOS.

However, I'm encountering an issue during the USBX host stack initialization. Specifically, the function ux_host_stack_initialize() returns UX_ERROR, and based on debugging, it appears to be related to insufficient memory allocation.

Here’s what I’ve done so far:

  • Using default USBX and FileX settings in STM32CubeMX.

  • Enabled USB in Host mode and selected the necessary middleware components.

  • No RTOS selected in the project.

  • No changes to heap/memory sizes so far.

I’ve attached a few screenshots of my CubeMX configuration and relevant code snippets for reference.

Has anyone experienced this issue on the STM32H573 when using USBX & FileX without an RTOS?

  • Do I need to manually increase the heap or configure memory pools differently?

  • Any recommended memory allocation settings changes for USBX/FileX in standalone mode?

  • Are there specific considerations for USB MSC with USBX on STM32H5 without ThreadX?

Any advice, example projects, or tips would be greatly appreciated!

Thank you in advance for your help.

Best regards,
Er.Vijay Kushwah
Email:vijaykushwah1112@gmail.com
Gailron Control Devices Pvt. Ltd.
info@gailron.com
DLF industrial area Faridabad, Haryana,Inida.

0 REPLIES 0