2017-11-10 07:28 AM
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 ?
2017-11-13 06:26 AM
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?