AnsweredAssumed Answered

Issue with USB Host Mass Storage device

Question asked by khemkar.sapana on Jun 21, 2017

Hi

We have STM32F429 based board.

I am trying to read USB mass storage device on this board.

I have referred sample code provided in STM32Cube_FW_F4_V1.12.0\Projects\STM324x9I_EVAL\Applications\USB_Host\MSC_RTOS

When device is connected, I am getting event HOST_USER_CLASS_ACTIVE from library.

When I receive this event, I am sending device connected message to usb host application task.

When application task receives device connected message, I am calling f_open API.

When f_open is called, I get hard fault error. 

When I debugged issue, I observed that when USBH_MSC_RdWrProcess() is called, USBH_LL_NotifyURBChange() is called through ISR twice. First time it successfully calls osMessagePut ( phost->os_event, USBH_URB_EVENT, 0); 

But next time it fails as phost->os_event has garbage value and hard fault is generated.

Has someone faced similar issue? Any pointers will be great help.

Thanks in advance. 

 

Outcomes