Skip to content

Commit

Permalink
stm32: Only enable one direction on usbfs double buffered end points
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
KevinOConnor committed Oct 4, 2023
1 parent 6adff39 commit 615db72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stm32/usbfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,12 +342,12 @@ usb_reset(void)

ep = USB_CDC_EP_BULK_OUT;
USB_EPR[ep] = (USB_CDC_EP_BULK_OUT | USB_EP_BULK | USB_EP_KIND
| USB_EP_RX_VALID | USB_EP_TX_NAK | USB_EP_DTOG_TX);
| USB_EP_RX_NAK | USB_EP_DTOG_TX);
bulk_out_push_flag = USB_EP_DTOG_TX;

ep = USB_CDC_EP_BULK_IN;
USB_EPR[ep] = (USB_CDC_EP_BULK_IN | USB_EP_BULK | USB_EP_KIND
| USB_EP_RX_NAK | USB_EP_TX_NAK);
| USB_EP_TX_NAK);
bulk_in_pop_flag = USB_EP_DTOG_RX;

USB->CNTR = USB_CNTR_CTRM | USB_CNTR_RESETM;
Expand Down

0 comments on commit 615db72

Please sign in to comment.