Skip to content

Commit af90d98

Browse files
committed
fix samd dcd_clear_stall also reset data toggle
1 parent 3c5f92d commit af90d98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cores/arduino/Adafruit_TinyUSB_Core/tinyusb/src/portable/microchip/samd21/dcd_samd21.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr)
223223
UsbDeviceEndpoint* ep = &USB->DEVICE.DeviceEndpoint[epnum];
224224

225225
if (tu_edpt_dir(ep_addr) == TUSB_DIR_IN) {
226-
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1;
226+
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1 | USB_DEVICE_EPSTATUSCLR_DTGLIN;
227227
} else {
228-
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0;
228+
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0 | USB_DEVICE_EPSTATUSCLR_DTGLOUT;
229229
}
230230
}
231231

cores/arduino/Adafruit_TinyUSB_Core/tinyusb/src/portable/microchip/samd51/dcd_samd51.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ void dcd_edpt_clear_stall (uint8_t rhport, uint8_t ep_addr)
227227
UsbDeviceEndpoint* ep = &USB->DEVICE.DeviceEndpoint[epnum];
228228

229229
if (tu_edpt_dir(ep_addr) == TUSB_DIR_IN) {
230-
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1;
230+
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1 | USB_DEVICE_EPSTATUSCLR_DTGLIN;
231231
} else {
232-
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0;
232+
ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0 | USB_DEVICE_EPSTATUSCLR_DTGLOUT;
233233
}
234234
}
235235

0 commit comments

Comments
 (0)