Prevent Kinetis USB setup packets at wrong time

When disconnecting USB clear all pending interrupts. This ensures that
pending setup packets are dropped rather than being triggered after
disconnect.
pull/9768/head
Russ Butler 2018-04-22 22:14:47 -05:00 committed by Russ Butler
parent 561a2407f4
commit 630e6292c9
1 changed files with 4 additions and 0 deletions

View File

@ -203,6 +203,10 @@ void USBPhyHw::disconnect()
USB0->CTL &= ~USB_CTL_USBENSOFEN_MASK;
// Pull up disable
USB0->CONTROL &= ~USB_CONTROL_DPPULLUPNONOTG_MASK;
while (USB0->ISTAT) {
USB0->ISTAT = 0xFF;
}
}
void USBPhyHw::configure()