mirror of
https://github.com/apache/nuttx.git
synced 2026-08-22 14:08:30 +00:00
arm/stm32: Route EP0 completions to the EP0 handler on M0 parts.
The correct transfer loop in stm32_usb_interrupt() dispatched every completion to stm32_epdone(), including those for endpoint 0. stm32_epdone() implements the generic bulk/interrupt endpoint completion path. It does not decode the SETUP stage, does not maintain the EP0 state machine, and does not apply the EP0 specific RX/TX status rules. Control transfers therefore never completed correctly and the device could not be enumerated. Dispatch endpoint 0 to stm32_ep0done(), which is the control endpoint handler and is already used for the same purpose by the low priority transfer path in stm32_lptransfer(). Assisted-by: GitHub Copilot:claude-opus-5 Signed-off-by: jsanchez-2g <jsanchez@2g-eng.com>
This commit is contained in:
parent
a271b641a5
commit
432d21a116
1 changed files with 8 additions and 1 deletions
|
|
@ -2390,7 +2390,14 @@ static int stm32_usb_interrupt(int irq, void *context, void *arg)
|
|||
|
||||
/* And handle the completion event */
|
||||
|
||||
stm32_epdone(priv, epno);
|
||||
if (epno == EP0)
|
||||
{
|
||||
stm32_ep0done(priv, istr);
|
||||
}
|
||||
else
|
||||
{
|
||||
stm32_epdone(priv, epno);
|
||||
}
|
||||
|
||||
/* Fetch the status again for the next time through the loop */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue