diff --git a/usb_driver.c b/usb_driver.c index 3d70cd4..c1395cb 100644 --- a/usb_driver.c +++ b/usb_driver.c @@ -345,7 +345,7 @@ void usbdrv_configure_endpoint(uint8_t ep, uint8_t dir, const USBDRV_EpConfig *c // program FIFO corresponding FIFO number WRITE_FIELD(USBINEP[ep].DIEPCTL, USB_OTG_DIEPCTL_TXFNUM, ep); - // store Tx FIFO size + // store Tx FIFO size (both fields are WORD units, NOT bytes, this RM is missing this information!) uint32_t tx_fifo_config = ((cfg->fifo_size >> 2) << USB_OTG_DIEPTXF_INEPTXFD_Pos) | (cfg->fifo_address >> 2); // combine size in DWORDs and address *(USB_pDIEPTXF[ep]) = tx_fifo_config; // save