Skip to content

Commit 615db72

Browse files
committed
stm32: Only enable one direction on usbfs double buffered end points
The bulk out endpoint should not be enabled in tx mode, and the bulk in endpoint should not be enabled in rx mode. Signed-off-by: Kevin O'Connor <[email protected]>
1 parent 6adff39 commit 615db72

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stm32/usbfs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,12 +342,12 @@ usb_reset(void)
342342

343343
ep = USB_CDC_EP_BULK_OUT;
344344
USB_EPR[ep] = (USB_CDC_EP_BULK_OUT | USB_EP_BULK | USB_EP_KIND
345-
| USB_EP_RX_VALID | USB_EP_TX_NAK | USB_EP_DTOG_TX);
345+
| USB_EP_RX_NAK | USB_EP_DTOG_TX);
346346
bulk_out_push_flag = USB_EP_DTOG_TX;
347347

348348
ep = USB_CDC_EP_BULK_IN;
349349
USB_EPR[ep] = (USB_CDC_EP_BULK_IN | USB_EP_BULK | USB_EP_KIND
350-
| USB_EP_RX_NAK | USB_EP_TX_NAK);
350+
| USB_EP_TX_NAK);
351351
bulk_in_pop_flag = USB_EP_DTOG_RX;
352352

353353
USB->CNTR = USB_CNTR_CTRM | USB_CNTR_RESETM;

0 commit comments

Comments
 (0)