-
Notifications
You must be signed in to change notification settings - Fork 3k
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
TARGET_STM: fix unterminated multi-packet USB transaction #15465
Conversation
Fix issue ARMmbed#15384 by sending a zero-length packet if the packet sent had the same size as the endpoint buffer size. This is needed to comply with the USB protocol which assumes an ongoing multi-packet USB transaction otherwise. STM32 HAL PCD handle parameters are used to avoid data duplication in RAM. Signed-off-by: Daniel Starke <[email protected]>
@jeromecoutant could you review please? |
I have noticed this PR in #15384 , so let's wait for some time ? |
Maybe ACI can be started ? |
CI started (server was restarted, itshould trigger now) |
Jenkins CI Test : ✔️ SUCCESSBuild Number: 1 | 🔒 Jenkins CI Job | 🌐 Logs & ArtifactsCLICK for Detailed Summary
|
Back to review, There was a comment in the issue referenced above, what do you think? |
It was my concern in the very beginning that changing this on target side might be inappropriate. Usually, the hardware does not know whether we want to perform a multi-packet transaction or not. Hence, the PHY has no way to determine whether to send a ZLP or not. But there may be devices out there that ignore this fact and disallow multi-packet transaction by always terminating all transactions after a single packet by auto send ZLP. |
Hi @daniel-starke, |
Hi @cyliangtw, |
I have no STM device on hand, so I verified it on NuMaker-IoT-M467 device. |
I know. Just wanted to make sure that there is no target specific code blocking this function. I will try it on a NUCLEO-H723ZG later on. |
Closing this pull request. See #15473. |
Summary of changes
Fix issue #15384 by sending a zero-length packet if the packet sent had the same size as the endpoint buffer size. This is needed to comply with the USB protocol which assumes an ongoing multi-packet USB transaction otherwise.
STM32 HAL PCD handle parameters are used to avoid data duplication in RAM.
Impact of changes
Affects all STM32 targets with USB device support.
Documentation
None
Pull request type
Test results
Further tests would be desirable but require actual hardware.
Basic function test has been performed with NUCLEO-H723ZG.