From 3e3e4504088ca9f579aaedf3da273af983de0fe1 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Thu, 26 Oct 2017 19:05:18 +0200 Subject: [PATCH] cdcacm.c: Use less buffer for the usb_uart buffers and reallocate. With 128 bytes for both usb_uart buffers, traceswo gives errors! Keep the size for the receive buffer and diminisch the transmit buffer, as there is no flow control to the device. Probably related to https://github.com/libopencm3/libopencm3/issues/477 --- src/platforms/common/cdcacm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/common/cdcacm.c b/src/platforms/common/cdcacm.c index 62cc419..ccf6706 100644 --- a/src/platforms/common/cdcacm.c +++ b/src/platforms/common/cdcacm.c @@ -517,7 +517,7 @@ static void cdcacm_set_config(usbd_device *dev, uint16_t wValue) /* Serial interface */ usbd_ep_setup(dev, 0x03, USB_ENDPOINT_ATTR_BULK, - CDCACM_PACKET_SIZE, usbuart_usb_out_cb); + CDCACM_PACKET_SIZE / 2, usbuart_usb_out_cb); usbd_ep_setup(dev, 0x83, USB_ENDPOINT_ATTR_BULK, CDCACM_PACKET_SIZE, usbuart_usb_in_cb); usbd_ep_setup(dev, 0x84, USB_ENDPOINT_ATTR_INTERRUPT, 16, NULL);