cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX with USB cdc Host

tejashwini
Associate II

Hello everyone,
I am developing firmware for the STM32F7469I discovery board, and I'm utilizing TouchGFX for the GUI aspect of the project. However, I am encountering a problem when enabling USB-FS HOST functionality. The GUI and other peripherals such as UART and I2C are functioning correctly. However, as soon as I connect a device to the USB port on the discovery board, the device is in START state, but subsequently, the entire board freezes. Specifically, the USBH_UserProcess callback is invoked, and the HOST_USER_CONNECTION line is executed, but afterwards, the system becomes unresponsive.  The device doesn't go into ready state.

I am set proper clock, i have attached the image of my clock setting.

I would greatly appreciate any insights or potential solutions to address this deadlock issue.

7 REPLIES 7
FBL
ST Employee

Hi @tejashwini 

Did you ensure that there are no conflicts with other peripherals? Have you tried the example CDC Host provided here ?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.



@tejashwini wrote:

I am encountering a problem when enabling USB-FS HOST functionality. The GUI and other peripherals such as UART and I2C are functioning correctly. However, as soon as I connect a device to the USB port on the discovery board, the device is in START state, but subsequently, the entire board freezes.


Does your USB code work on its own - without all the "GUI and other peripherals such as UART and I2C" ?

Hi,

my TouchGFX only code is working fine and also USB CDC HOST only code is also working fine.

But in combining both the usb host is not going into ready state.

Please suggest some reasons and solution why it is not getting ready

Thank you

 

So same answer as in the other thread:

Compare & contrast the operation of the two.

See where they differ:

  • what is happening in the working case, that's not happening in the non-working case?
  • what is not happening in the working case, that is happening in the non-working case?

Instrument your code to give visibility of what's going on ...

 

 

Hi,

In the context of utilizing USB Host without FreeRTOS, I have observed that within the USBH_Process function, the switch case transitions from HOST_CLASS_REQUEST to HOST_CLASS and subsequently to APPLICATION_READY.

However, upon integrating FreeRTOS with USB CDC, the behavior changes; the switch case now progresses from HOST_CLASS_REQUEST to HOST_ABORT_STATE, failing to reach the APPLICATION_READY state.

I have attempted to resolve this issue by increasing the heap size, stack size, USB stack size, and adjusting the priority, yet the USB remains unable to enter the ready state. 

Please suggest some reasons and solution why it is not getting ready

Thank you


@tejashwini wrote:

In the context of utilizing USB Host without FreeRTOS, I have observed that within the USBH_Process function, the switch case transitions from HOST_CLASS_REQUEST to HOST_CLASS and subsequently to APPLICATION_READY.


So look at what gets it from HOST_CLASS_REQUEST to HOST_CLASS, and then what gets it from there to APPLICATION_READY

 


@tejashwini wrote:

However, upon integrating FreeRTOS with USB CDC, the behavior changes; the switch case now progresses from HOST_CLASS_REQUEST to HOST_ABORT_STATE,


So, again, look at what causes it to get to the HOST_ABORT_STATE.

What event(s) is/are different from the working case?