cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_HCD_IRQHandler only happens once

fakheri.ali
Associate II
Posted on June 24, 2018 at 06:41

Hi everyone.

We have run a project on discovery f746 board consist of FREE RTOS ,  emwin and fat fs sd card library,that it works fine.

Now we want to add USB OTG Host in FS mode to our project.

We tried to append configurations of MSC_Standalone sample to our project and unfortunately it didn't work.

We debugged the code and it seems &sharpifdef USE_USB_FS is not defined in our project.

Also after reset the board while the USB flash is connected to board interrupt of USB ( HAL_HCD_IRQHandler(&hhcd); ) happens one time and It does not happen anymore.

What should we do?

Any suggestions.

Thanks in advance!

#rtos #core #stm32-interrupt #host-driver #usb
2 REPLIES 2
fakheri.ali
Associate II
Posted on June 26, 2018 at 07:28

Hi everyone.

We have these four functions at the beginning of the thread.

Menu_Init();

/* Init Host Library */

USBH_Init(&hUSBHost, USBH_UserProcess, 0);

/* Add Supported Class */

USBH_RegisterClass(&hUSBHost, USBH_MSC_CLASS);

/* Start Host Process */

USBH_Start(&hUSBHost);

After these ,we created a window from emwin library.

In this window when press one of  the buttons , these two functions run.

/* USB Host Background task */

USBH_Process(&hUSBHost);

/* MSC Menu Process */

Appli_state = APPLICATION_READY;

MSC_MenuProcess();

All of these functions were copied from 

MSC_Standalone sample.

But as i said,

interrupt of USB ( HAL_HCD_IRQHandler(&hhcd); ) happens one time.

Please give us some suggestions to find out and resolve the problem.

Thanks a lot.

Colin Cina
Associate II
Posted on July 09, 2018 at 10:13

Hi all, 

I also ran into a similar problem while using the RTOS together with custom USB Host class driver. I noticed that the enumeration of the device could no be performed because the USBH_Core state machine never reaches the HOST_DEV_ATTACHED state, In fact the 

HAL_HCD_IRQHandler(&amphhcd) is not called anymore. I suspect that at some point the interruptions are disabled but i can&39t figure out where. 

#rtos

 

#stm32%20interrupt

 

#

 

#host%20driver

 

#