Skip to main content
Zakba.1
Associate III
April 5, 2024
Question

touchgfx and usb msc

  • April 5, 2024
  • 3 replies
  • 1124 views

hello, I need to use both touchgfx and usb msc host with stm32h743 in my project. they work fine separately , but when I add usb to my touchgfx project it does not work(all my usb implementations are based on controllerstech video). Do I need to do any different thing when they are used together? thank you for your help.

3 replies

ST Employee
April 10, 2024

Hello @Zakba.1,

What doesn't work ? The touchgfx application, the usb msc or both ?

Regards, 

Associate II
January 31, 2025

Hello @LouisB 

I'm facing the same issue—I can't get TouchGFX and USB MSC to work together, the appli_state not able to go to APPLICATION_READY.

@Zakba.1, any updates on this?

BR

Visitor II
July 18, 2025

Are there any updates to this issue? @LouisB The TouchGFX application works and I'm implementing a MSC USB device on core M4. If I start a project from scratch and enable the USB and corresponding middleware, it works as expected, but when you start from a TouchGFX project the USB device is not recognized on plug or, tops, appears in the device manager as an "unknown device".

Visitor II
December 10, 2025

Are there any updates to this issue?@FZUser 

Lead II
July 21, 2025

I got it to work. The ST USB implementation is problematic. It can crash due to null references.I had to fix those manually.

It can also be blocking and I don't use an RTOS. So I put my main thread in the USB idle loop.

In pseudo code:

main_thread
{
//do stuff
}

loop
{
main_thread
usb_thread
}

usb_idle()
{
main_thread
}


 

Doesn't result in infinite recursion, because it doesn't call loop from idle. But it does increase stack a little. Be sure to measure stack usage during run time and compile time. Stack usage can be significantly larger than default stack size.

USB works, but I wouldn't call it stable. Here is the topic I made about it: https://community.st.com/t5/stm32-mcus-embedded-software/hard-fault-in-usbh-msc-rdwrprocess-and-usbh-msc-getluninfo/td-p/753676

"Kudo posts if you have the same problem and kudo replies if the solution works.Click ""Accept as Solution"" if a reply solved your problem. If no solution was posted please answer with your own."