jsanchez-2g opened a new pull request, #19903:
URL: https://github.com/apache/nuttx/pull/19903
## Summary
Fix four defects in the shared STM32 M0 USB device driver:
- Correct packet memory area addressing. The M0 PMA is a linear 16-bit
memory, but the driver used STM32F1-style offset scaling and 32-bit
descriptor accesses.
- Route endpoint 0 correct-transfer events to the control-endpoint handler
instead of the generic endpoint handler.
- Enable and acknowledge USB controller error and PMA-overrun interrupts.
- Issue the correct USB peripheral reset pulse in arm_usbinitialize().
The combined defects prevented correct control transfers and USB enumeration
on
STM32 M0 USB device parts.
## Impact
- New feature added: NO. Bug fixes only.
- User adaptation required: NO.
- Build impact: NO.
- Hardware impact: YES. The driver is shared by STM32 F0, L0, G0, C0, and
related M0 USB device implementations.
- Documentation update required: NO.
- Security impact: NO.
- Compatibility impact: Existing working configurations retain the same
public
API and behavior; broken USB device paths become functional.
## Testing
Build host:
- Linux 6.18.33.2-microsoft-standard-WSL2
- arm-none-eabi-gcc 13.2.1
Hardware:
- ST NUCLEO-F072RB
- ST NUCLEO-L073RZ
Before:
- Both board USB-device configurations built but failed to enumerate as USB
devices when tested from pristine apache/master plus board support.
After:
- NUCLEO-F072RB: build, flash, NSH on USART2, and USB CDC/ACM enumeration
pass.
- NUCLEO-L073RZ: build, flash, NSH on USART2, and USB CDC/ACM enumeration
pass.
Validation:
- ./tools/checkpatch.sh -g apache/master...usb/m0-driver-fixes
- File-mode checkpatch passed for all changed files.
- Clean-room build and hardware test passed with matching upstream NuttX
Apps.
## PR verification Self-Check
- [x] This PR introduces one functional area: STM32 M0 USB device driver
fixes.
- [x] All commits include a description, Signed-off-by, and Assisted-by
trailers.
- [x] Source passes checkpatch.
- [x] Real hardware build and runtime testing was completed.
- [x] This PR is ready for review.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]