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
Russ Butler 2018-04-23 17:58:05 -05:00
parent 0ae8defc60
commit bdb8b5f342
1 changed files with 1 additions and 0 deletions

View File

@ -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