stm32h7:USB otgdev Ensure proper EP state
Repeated automated sercon, serdis on VBUS proved to fail for CDCACM DATA IN (device Serial TX). The root cause was that the EP was left active after disconnect. This resulted in the first serial write falling to kick-off the EP IN request. That should restart the EP ISR.
This commit is contained in:
parent
21f049b43a
commit
e488f0047d
|
@ -2080,6 +2080,8 @@ static void stm32_usbreset(struct stm32_usbdev_s *priv)
|
||||||
/* Reset IN endpoint status */
|
/* Reset IN endpoint status */
|
||||||
|
|
||||||
privep->stalled = false;
|
privep->stalled = false;
|
||||||
|
privep->active = false;
|
||||||
|
privep->zlp = false;
|
||||||
|
|
||||||
/* Return read requests to the class implementation */
|
/* Return read requests to the class implementation */
|
||||||
|
|
||||||
|
@ -2089,6 +2091,8 @@ static void stm32_usbreset(struct stm32_usbdev_s *priv)
|
||||||
/* Reset endpoint status */
|
/* Reset endpoint status */
|
||||||
|
|
||||||
privep->stalled = false;
|
privep->stalled = false;
|
||||||
|
privep->active = false;
|
||||||
|
privep->zlp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
stm32_putreg(0xffffffff, STM32_OTG_DAINT);
|
stm32_putreg(0xffffffff, STM32_OTG_DAINT);
|
||||||
|
@ -3959,6 +3963,8 @@ static int stm32_epout_configure(FAR struct stm32_ep_s *privep,
|
||||||
privep->ep.maxpacket = maxpacket;
|
privep->ep.maxpacket = maxpacket;
|
||||||
privep->eptype = eptype;
|
privep->eptype = eptype;
|
||||||
privep->stalled = false;
|
privep->stalled = false;
|
||||||
|
privep->active = false;
|
||||||
|
privep->zlp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the interrupt for this endpoint */
|
/* Enable the interrupt for this endpoint */
|
||||||
|
@ -4030,6 +4036,8 @@ static int stm32_epin_configure(FAR struct stm32_ep_s *privep,
|
||||||
privep->ep.maxpacket = maxpacket;
|
privep->ep.maxpacket = maxpacket;
|
||||||
privep->eptype = eptype;
|
privep->eptype = eptype;
|
||||||
privep->stalled = false;
|
privep->stalled = false;
|
||||||
|
privep->active = false;
|
||||||
|
privep->zlp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable the interrupt for this endpoint */
|
/* Enable the interrupt for this endpoint */
|
||||||
|
|
Loading…
Reference in New Issue