From cae6cfe9dd39988cffe8d24604b8bda09dc0b16a Mon Sep 17 00:00:00 2001 From: aglass0fmilk Date: Wed, 27 Mar 2019 11:46:11 -0400 Subject: [PATCH] Fixed failure on endpoint test data toggle reset (under Windows): "Data toggle not reset when calling ClearFeature(ENDPOINT_HALT) on an endpoint that has not been halted." --- .../TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp b/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp index d522bec913..a6a26eba24 100644 --- a/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp +++ b/usb/device/targets/TARGET_NORDIC/TARGET_MCU_NRF52840/USBPhy_Nordic.cpp @@ -402,6 +402,9 @@ void USBPhyHw::endpoint_unstall(usb_ep_t endpoint) { nrf_drv_usbd_ep_t ep = get_nordic_endpoint(endpoint); nrf_drv_usbd_ep_stall_clear(ep); + + // Clear data toggle + nrf_drv_usbd_ep_dtoggle_clear(ep); /* * This is a somewhat hacky fix to fully "unload"