cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use USB OTG host with TouchGFX freertos?

cagriyeleser
Associate II

When I tried USB Host standalone examples software goes to SPDIF_RX_IRQHandler. I think the problem is about queue from ISR.

7 REPLIES 7
Martin KJELDSEN
Chief III

Hi,

What exactly is the problem you're having and what are you trying to accomplish?

Thanks!

Best regards,

Martin

cagriyeleser
Associate II

thanks for reply

I tried a lot of examples. Firstly I tried USB host MSC_Standalone example. When I tried integrate this example to TouchGFX any project, while USB is attached screen is frozen. In debugging stops on SPDIF_RX_IRQHandler

Firstly I create task as following

xTaskCreate(GUITask, (TASKCREATE_NAME_TYPE)"GUITask", configGUI_TASK_STK_SIZE, NULL, configGUI_TASK_PRIORITY, NULL);

xTaskCreate(MainTask, (TASKCREATE_NAME_TYPE)"MainTask", 1250, NULL, configGUI_TASK_PRIORITY+1, NULL);

static void MainTask(void* params){

USB_Init();

while(1){

vTaskDelay(50);

mainwhileusb();

}

}

void USB_Kur(void){

 USBH_Init(&hUSBHost, USBH_UserProcess, 0);

 USBH_RegisterClass(&hUSBHost, USBH_MSC_CLASS);

 USBH_Start(&hUSBHost);

}

void mainwhileusb(void){

USBH_Process(&hUSBHost);

}

Martin KJELDSEN
Chief III

What is your application doing? Are you in a hardfault or is the GUI task blocked?

cagriyeleser
Associate II

Any hardfault is seen. But now in SPDIF_RX_IRQHandler

cagriyeleser
Associate II

I am using Keil and working with STM32f746 DISCO

Martin KJELDSEN
Chief III

Maybe you could cross reference the configuration of the examples you've been running vs the TouchGFX application? Are you sure your interrupt configuration is correct? E.g. Why are you hitting the SPDIF_RX_IRQHandler?

cagriyeleser
Associate II

USB_Init is from working example (not using TouchGFX) so I dont think wrong interrupt configurations. But I dont know interrupt configurations for freertos and freertosconfig.h. No example on internet for TouchGFX including USB