2025-02-07 05:31 AM
Hello,
I am using an STM32F769I-DISCO board to implement USB HS in my TouchGFX project, but it is not working as expected. I have already tested USB functionality with FreeRTOS CMSISv2 without TouchGFX, and it works fine. However, when I try to run both TouchGFX and USB HS host (MSC) together, the application state remains stuck at APPLICATION_START when the USB disk is connected and never make transition to APPLICATION_READY.
I have tried adjusting the priorities of the USB and TouchGFX tasks and increased the stack size for the USB task, but the issue persists.
Any suggestions to help get both working together properly would be greatly appreciated ?
Best regards.
2025-02-10 03:47 AM
Hello @walidhmz ,
Can you share the call stack?
Where does it get stuck? What is the line and the code?
Can you try to lower the clock speed?
Could you try to move the TouchGFX task entry at the end of the USB setup (or the other way around)?
Is there any potential pin conflict when enabling both?
When you enabled USB only, did you use FreeRTOS too?
Regards,
2025-02-10 05:13 AM - edited 2025-02-10 06:05 AM
Thank you for your suggestions.
- It gets stuck when entering USBH_Process. After receiving Appli_state: APPLICATION_START and phost->gStat: HOST_CLASS_REQUEST, the status remains at USBH_BUSY in usb_core.c, and phost->gState is set to HOST_ABORT_STATE.
- Initially, I tested the setup at 216 MHz, then reduced the clock to 96 MHz without any improvement.
- There is no conflict between LTDC/DSI and USB, the pins are available before USB is enabled.
- I also tried to use to move the TouchGFX task entry at the end of the USB setup.
- Yes, it works correctly when i enbled USB only with FreeRTOS.
You can find my .ioc file attached with a simple example integrating both USB and TouchGFX. I’m stuck at this point and would appreciate any help.
BR
2025-02-11 02:07 AM
Hello @walidhmz ,
It looks like you get to phost->gstate = HOST_ABORT_STATE because phost->pActiveClass is NULL.
It also looks like there is a specific log systems for the USB part, have you looked at it?
Perhaps it is because phost is not initialized correctly.
One solution to start debugging could be to look at the working project (without TouchGFX) and see where pActiveClass is set and then see if you do the same thing in the project with both USB and TouchGFX.
Regards,
2025-02-11 05:21 AM