cancel
Showing results for 
Search instead for 
Did you mean: 

HardFault_Handler

cyril2399
Associate II
Posted on July 19, 2011 at 10:34

Hello,

I am trying to combine my project with USB host project. And every time I compile I go straight to Hard Fault Handler when I enter into USBH_Init(&USB_OTG_FS_dev, &MSC_cb , &USR_Callbacks);

The USB host project works. My project works (0 errors, 0 warnings). But I have this problem.

If anyone knows how to solve my problem...

Thanks to all
3 REPLIES 3
Andrew Neil
Evangelist
Posted on July 19, 2011 at 10:38

''My project works (0 errors, 0 warnings)''

 

Zero errors & warnings just means that your code builds - it is

no

 guarantee that it will work!

 

 

What debugging have you done to determine exactly where the Hard Fault occurs?
rosarium
Associate II
Posted on July 19, 2011 at 13:55

There could be many reasons for the hard fault.

Are you using the host lib as it is or you did some user modifications. Also note that host MSC example has EFSL in it. Did u make some changes in it?

Which mass-storage device are you using? Can you capture the USB trace and provide?

cyril2399
Associate II
Posted on July 22, 2011 at 13:58

Thank you for your answer.

I have found my problem... I have forgot the stm32f10x_it.h for the interrupt and a file with .s for extention.

It works now.