Skip to content

Commit

Permalink
[nanokit] Increase USB CDC buffer size for higher baud rate
Browse files Browse the repository at this point in the history
Tested with cskburn:

* before: 748800 bps
* after: 1500000 bps
  • Loading branch information
xychen committed Sep 2, 2024
1 parent 3f5d71e commit 7b51729
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/hic_hal/stm32/stm32f103xb/usb_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,13 @@
#define USBD_CDC_ACM_HS_BINTERVAL1 0
#define USBD_CDC_ACM_CIF_STRDESC L"mbed Serial Port"
#define USBD_CDC_ACM_DIF_STRDESC L"mbed Serial Port"
#ifdef LISTENAI_NANOKIT
#define USBD_CDC_ACM_SENDBUF_SIZE 512
#define USBD_CDC_ACM_RECEIVEBUF_SIZE 512
#else /* LISTENAI_NANOKIT */
#define USBD_CDC_ACM_SENDBUF_SIZE 64
#define USBD_CDC_ACM_RECEIVEBUF_SIZE 64
#endif /* LISTENAI_NANOKIT */
#if (((USBD_CDC_ACM_HS_ENABLE1) && (USBD_CDC_ACM_SENDBUF_SIZE < USBD_CDC_ACM_HS_WMAXPACKETSIZE1)) || (USBD_CDC_ACM_SENDBUF_SIZE < USBD_CDC_ACM_WMAXPACKETSIZE1))
#error "Send Buffer size must be larger or equal to Bulk In maximum packet size!"
#endif
Expand Down

0 comments on commit 7b51729

Please sign in to comment.