We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi,
Anybody has used the RL-USB Host + Flash File System with the Keil RTX operating system? I am able to detect the USB host insertion in a task using:
__task void usb_host (void) { int dummy=0; for(;;){ usbh_engine(); if (usbh_msc_status () == __TRUE) { dummy |=0x01; retv = finit (NULL); // Wait until the MSD is ready if (retv == 1) { dummy |=0x01; } else { dummy |=0x01; } } } }
As soon as the finit function is called I get the the HardFault_Handler(). Looking a the call stack the rt_mut_wait() is the function before the fault happen.
I am using LPC1788 Cortex-M3 processor.
Any idea what is the cause of this problem?
Thanks
Because task can start executing after OS initialization and it starts talking to uninitialized USB peripheral what of course is not a proper way to go.