Skip to main content
cagriyeleser
Associate II
Dec 20, 2018 7:36 AM UTC
Question

How can I use USB OTG host with TouchGFX freertos?

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

This topic has been closed for replies.

7 replies

Martin KJELDSEN
Principal III
Dec 20, 2018 8:43 AM UTC

Hi,

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

Thanks!

Best regards,

Martin

cagriyeleser
Associate II
Dec 20, 2018 8:52 AM UTC

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
Principal III
Dec 20, 2018 9:17 AM UTC

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

cagriyeleser
Associate II
Dec 20, 2018 9:24 AM UTC

Any hardfault is seen. But now in SPDIF_RX_IRQHandler

cagriyeleser
Associate II
Dec 20, 2018 9:27 AM UTC

I am using Keil and working with STM32f746 DISCO

Martin KJELDSEN
Principal III
Dec 20, 2018 10:34 AM UTC

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
Dec 20, 2018 11:06 AM UTC

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