Browse Source

Retry control requests for slow flash drives

Conflicts:
	Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_ctlreq.c
USG_1.0
Robert Fisk 2 years ago
parent
commit
23e0214d52
  1. 4
      Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_def.h
  2. 2
      Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_ctlreq.c

4
Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Inc/usbh_def.h

@ -187,10 +187,10 @@
#endif /* USBH_MAX_PIPES_NBR */
#define USBH_DEVICE_ADDRESS_DEFAULT 0
#define USBH_MAX_ERROR_COUNT 2
#define USBH_MAX_ERROR_COUNT 10
#define USBH_DEVICE_ADDRESS 1
#define USBH_CTRL_TRANSACTION_TIMEOUT_MS 100
#define USBH_CTRL_TRANSACTION_TIMEOUT_MS 200
/**

2
Downstream/Middlewares/ST/STM32_USB_Host_Library/Core/Src/usbh_ctlreq.c

@ -826,7 +826,7 @@ static USBH_StatusTypeDef USBH_HandleControl (USBH_HandleTypeDef *phost)
if (++ phost->Control.errorcount <= USBH_MAX_ERROR_COUNT)
{
/* try to recover control */
USBH_LL_Stop(phost);
// USBH_LL_Stop(phost);
/* Do the transmission again, starting from SETUP Packet */
phost->Control.state = CTRL_SETUP;

Loading…
Cancel
Save