2024-04-05 1:17 AM
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.
2024-04-10 5:06 AM
Hello @Zakba.1,
What doesn't work ? The touchgfx application, the usb msc or both ?
Regards,
2025-01-31 7:10 AM
2025-07-18 12:19 AM
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".
2025-07-21 4:28 AM - edited 2025-07-21 4:31 AM
I got it to work. The ST USB implementation is problematic. It can crash do 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