From 747815f03b256136daf6f531246927233c208980 Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Mon, 4 Feb 2019 20:30:47 -0500 Subject: [PATCH] stm32f4: Ensure endpoints enabled properly, using correct FIFOs. --- src/portable/stm/stm32f4/dcd_stm32f4.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/portable/stm/stm32f4/dcd_stm32f4.c b/src/portable/stm/stm32f4/dcd_stm32f4.c index f92e75814..139a97c42 100644 --- a/src/portable/stm/stm32f4/dcd_stm32f4.c +++ b/src/portable/stm/stm32f4/dcd_stm32f4.c @@ -224,13 +224,15 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) if(dir == TUSB_DIR_OUT) { out_ep[epnum].DOEPCTL |= USB_OTG_DOEPCTL_EPENA | \ + (1 << USB_OTG_DOEPCTL_USBAEP_Pos) | \ (bulk_or_int ? USB_OTG_DOEPCTL_SD0PID_SEVNFRM : 0uL) | \ desc_edpt->bmAttributes.xfer << USB_OTG_DOEPCTL_EPTYP_Pos | \ desc_edpt->wMaxPacketSize.size << USB_OTG_DOEPCTL_MPSIZ_Pos; } else { in_ep[epnum].DIEPCTL |= USB_OTG_DIEPCTL_EPENA | \ + (1 << USB_OTG_DIEPCTL_USBAEP_Pos) | \ (bulk_or_int ? USB_OTG_DIEPCTL_SD0PID_SEVNFRM : 0uL) | \ - epnum << USB_OTG_DIEPCTL_TXFNUM_Pos | \ + (epnum - 1) << USB_OTG_DIEPCTL_TXFNUM_Pos | \ desc_edpt->bmAttributes.xfer << USB_OTG_DIEPCTL_EPTYP_Pos | \ desc_edpt->wMaxPacketSize.size << USB_OTG_DIEPCTL_MPSIZ_Pos;