cancel
Showing results for 
Search instead for 
Did you mean: 

Issues using USB MSC Host Libraries

Posted on November 10, 2017 at 16:28

I have recently added USB support to a product, using the STM32_USB_Host_Library MSC class taken from the STM32Cube_FW_F2_V1.7.0 examples.

We successfully detect devices and write and read from the disk until we get a DISK io error.

Successive calls to either USBH_MSC_Write() or USBH_MSC_Read() fail as the MSC_Handle->unit[lun].state is either in MSC_READ or MSC_WRITE, not MSC_IDLE

Have you any clue how this could occur ?

1 REPLY 1
Posted on November 13, 2017 at 15:26

It appears that the interface is in a stalled state - A callback is made to void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd, uint8_t chnum, HCD_URBStateTypeDef urb_state)

But why would this happen - I am midway through a disk commit hence a complete interface reset would risk disk corruption?