mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
561a2407f4
commit
630e6292c9
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue