Skip to content

Commit 2ad05b2

Browse files
committed
Fix LPC1768 test failures
Reset endpoints when they are removed. This ensures buffers and the data toggle bit get reset back to zero.
1 parent 565ec75 commit 2ad05b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

usb/device/targets/TARGET_NXP/USBHAL_LPC17.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ void USBPhyHw::endpoint_remove(usb_ep_t endpoint)
583583

584584
disableEndpointEvent(endpoint);
585585

586+
// reset this endpoint, including data toggle
587+
SIEsetEndpointStatus(endpoint, 0);
588+
586589
LPC_USB->USBDevIntClr = EP_RLZED;
587590
LPC_USB->USBReEp &= ~EP(endpoint);
588591

0 commit comments

Comments
 (0)