2025-03-19 6:49 AM - edited 2025-03-19 6:59 AM
Hi to all,
I am developing a product with the STM32H523VET6. This product must have USB 2.0 used as MSC Host (a USB-C connector is used but both communication and power management are of type 2.0). I would like to use the libraries in bare metal, without an operating system.
For the configuration of the USB peripheral and the Middleware (bare metal) I used the CubeMX but when connecting a USB pen drive no event is generated (I inserted two breakpoints respectively on the functions ux_host_event_callback and ux_host_error_callback of the app_usbx_host.c file).
The USB pen drive used is this one and is formatted FAT32: https://amzn.eu/d/cHLLlJ6
I checked the power supplies and signals and they seem ok.
I repeated the same test using the NUCLEO-H563ZI demoboard (I don't have the demoboard for the micro used on the product) shorting SB7, putting the JP2 jumper in the USB USER position, powering the board with 5V from the CN8 connector and inserting only the USB part (always bare metal) via the CubeMX but the problem is the same.
I attach the project with the CubeMX file.
What could be wrong? Could be a CubeMX configuration problem or a library problem?
I noticed something strange but I don't know if it's correct: is it right that the ux_system_tasks_run function is never called?
Unfortunately I have not found any examples in the STM32H5 repository where the USB device is used as a bare metal MSC.