2015-12-08 01:56 AM
Hi,
STM32Cube_FW_F3_V1.3.0\Drivers\STM32F3xx_HAL_Driver\Src\stm32f3xx_hal_pcd.c In the function below: static HAL_StatusTypeDef PCD_EP_ISR_Handler(PCD_HandleTypeDef *hpcd) ... line 455: /*multi-packet on the NON control OUT endpoint*/ ep->xfer_count+=count; ep->xfer_buff+=count; if ((ep->xfer_len == 0) || (count < ep->maxpacket)) { /* RX COMPLETE */ HAL_PCD_DataOutStageCallback(hpcd, ep->num); } else { HAL_PCD_EP_Receive(hpcd, ep->num, ep->xfer_buff, ep->xfer_len); } the condition ((ep->xfer_len == 0) || (count < ep->maxpacket)) is always true because count is always lower than ep->maxpacket. So the HAL_PCD_DataOutStageCallback is always called! This mistake has little consequence, but this requires that the assembly of multi-packets are done at the highest level. #usb #stm32cube2015-12-10 01:42 AM
Hi ln.thierry,
This case is used when the host requests more than maxpacket. So, this code manages the multi-packet on the OUT endpoint,which means the size can be more than the maxpacket. -Shahrzad-