From f305c62a5fccb376db773fde6273e64e1fa9948f Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 7 Dec 2020 16:19:12 +1100 Subject: [PATCH] stm32/usb: Allocate 128 bytes to CDC data out EPs on non-multi-OTG MCUs. This much buffer space is required for CDC data out endpoints to avoid any buffer overflows when the USB CDC is saturated with data. Signed-off-by: Damien George --- ports/stm32/usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/stm32/usb.c b/ports/stm32/usb.c index 968b2999ce..5003bb27cc 100644 --- a/ports/stm32/usb.c +++ b/ports/stm32/usb.c @@ -102,8 +102,8 @@ STATIC const uint8_t usbd_fifo_size_cdc1[USBD_PMA_NUM_FIFO] = { #if MICROPY_HW_USB_CDC_NUM >= 2 STATIC const uint8_t usbd_fifo_size_cdc2[USBD_PMA_NUM_FIFO] = { 8, 8, 16, 16, // EP0(out), EP0(in), MSC/HID(out), MSC/HID(in) - 0, 8, 12, 12, // unused, CDC_CMD(in), CDC_DATA(out), CDC_DATA(in) - 0, 8, 12, 12, // unused, CDC2_CMD(in), CDC2_DATA(out), CDC2_DATA(in) + 0, 8, 16, 8, // unused, CDC_CMD(in), CDC_DATA(out), CDC_DATA(in) + 0, 8, 16, 8, // unused, CDC2_CMD(in), CDC2_DATA(out), CDC2_DATA(in) 0, 0, 0, 0, // 4x unused };