zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
9.83k stars 6.06k forks source link

drivers: udc_dwc2: Properly revive STALLed endpoints #72864

Closed tmon-nordic closed 1 week ago

tmon-nordic commented 2 weeks ago

Change the driver to comply with the official DWC2 programming guide when it comes to SETUP handling and endpoint STALLing. This is necessary for proper USB MSC operation.

With this PR, applied on top of #72774, all the USB2CV Chapter 9 and MSC tests are passing on nRF54H20 when UDC_BUF_POOL_SIZE is 8192 (with default buf size, the MSC tests getting the serial number fail because the USB2CV does set wLength to 4096).