Skip to content

Commit cedc8c6

Browse files
committed
drivers: udc: stm32: Fix RX FIFO min size
On USB HS, the previous lower limit of 64 is too small, the value 160 has been chosen apparently through trial and error. See 1204aa2 for the original implementation in the old device driver. Signed-off-by: Tobias Pisani <[email protected]>
1 parent bd9d7a7 commit cedc8c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/udc/udc_stm32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ static void udc_stm32_mem_init(const struct device *dev)
546546
}
547547

548548
/* The documentation is not clear at all about RX FiFo size requirement,
549-
* Allocate a minimum of 0x40 words, which seems to work reliably.
549+
* 160 has been selected through trial and error.
550550
*/
551-
words = MAX(0x40, cfg->ep_mps / 4);
551+
words = MAX(160, cfg->ep_mps / 4);
552552
HAL_PCDEx_SetRxFiFo(&priv->pcd, words);
553553
priv->occupied_mem = words * 4;
554554

0 commit comments

Comments
 (0)