I'am using FreeRTOS (this is important).
The USB is configurated like :
/*Set LL Driver parameters */
hhcd.Instance = USB_OTG_HS;
hhcd.Init.Host_channels = 11;
hhcd.Init.dma_enable = 1;
hhcd.Init.low_power_enable = 0;
hhcd.Init.phy_itface = HCD_PHY_EMBEDDED;
hhcd.Init.Sof_enable = 0;
hhcd.Init.speed = HCD_SPEED_HIGH;
hhcd.Init.vbus_sensing_enable = 0;
hhcd.Init.use_external_vbus = 0;
char at = "ATE0\r\n";
USBH_CDC_Transmit(&hUSB_Host, (uint8_t *) at, (uint32_t) strlen(at));
If the data is bigger than 64 (USB frame size) the transmit do not end.
If I add an osDelay(1) in the main USB thread ( USBH_Process_OS() ) the
transmit ends !
If I add a new thread to manage data received by the modem, the transmit ends !
But those workaround hide a bigger problem.
I suspect a FreeRTOS schedule and/or interrupt priority problem. So far I didn't managed to identifie it.
If someone has faced same problems please share your experience and/or fix,