You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Double buffering fix for reception. In the case of double buffering,
it is impossible to determine exactly how large the allocated buffer should be.
To achieve double-buffering acceleration, the PCD_FreeUserBuffer call must
occur before the HAL_PCD_DataOutStageCallback call. But the real data buffer
can be allocated only in this callback. It turns out that the approach itself
needs to be changed - always allocate maximum allowable endpoint buffer size
(it's already happends in USB_ActivateEndpoint). At the same time we need to
check the size of the data received. This check be done at the time of data
receipt. During reception confirmation, it may be that there is no allocated
buffer at all. In this case, we will have to leave the filled PMA intact and
not complete its release. In this case, this operation will be repeated in
HAL_PCD_EP_ReceiveData.
0 commit comments