mirror of https://github.com/ARMmbed/mbed-os.git
Fix Kinetis USB disconnect
When disconnecting in the middle of a setup packet USB stops working even after being re-connected. This is because the setup packet suspended endpoint events but nothing resumed endpoint events. This patch adds code to resume endpoint events in the reset handler.feature-hal-spec-usb-device
parent
0ae8defc60
commit
bdb8b5f342
|
@ -565,6 +565,7 @@ void USBPhyHw::process()
|
|||
|
||||
Data1 = 0x55555555;
|
||||
USB0->CTL |= USB_CTL_ODDRST_MASK;
|
||||
USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK;
|
||||
|
||||
USB0->ISTAT = 0xFF; // clear all interrupt status flags
|
||||
USB0->ERRSTAT = 0xFF; // clear all error flags
|
||||
|
|
Loading…
Reference in New Issue