cancel
Showing results for 
Search instead for 
Did you mean: 

touchgfx and usb msc

Zakba.1
Senior

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.

4 REPLIES 4
LouisB
ST Employee

Hello @Zakba.1,

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

Regards, 

Louis BOUDO
ST Software Engineer | TouchGFX

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

FZUser
Associate

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".

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

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.