-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
usbx cdc acm, missing zlp #21
Comments
I am having the same issue using PIMA class. The ZLP is not transmitted. |
Hi @chr-btz, Thanks for your report, The issue you pointed out is confirmed. This will be fixed in the next release. BR. |
hi @chr-btz , x-cube-azrtos-h7/Projects/NUCLEO-H723ZG/Applications/USBX/Ux_Device_CDC_ACM/USBX/App/ux_user.h Line 359 in 57faa03
Best Regards. |
Board: Nucleo F429zi
IDE: CubeIDE
When the endpoints max packet size equals the data to send size, usbx does not send a zlp, therefore the host does not recognize the transfer as complete.
Reproduce:
Ux_Device_CDC_ACM example
Change usbx_cdc_acm_write_thread_entry to something like this:
Set testlength to endpoints max packet size
Host wont recognize data
Analysis:
After investigation i found several issues,
host_length != slave_length will be false even if zlp is needed
x-cube-azrtos-h7/Middlewares/ST/usbx/common/core/src/ux_device_stack_transfer_request.c
Lines 150 to 168 in 84ed811
even if
transfer_request -> ux_slave_transfer_request_force_zlp gets set to UX_TRUE the zlp wont be sended because its exclusive to endpoint 0, see:
x-cube-azrtos-h7/Middlewares/ST/usbx/common/usbx_stm32_device_controllers/ux_dcd_stm32_callback.c
Lines 237 to 349 in 84ed811
when removed the host_length != slave_length in issue one and use this code for HAL_PCD_DataInStageCallback its working:
The text was updated successfully, but these errors were encountered: