Skip to content

USB Buffer size #2178

@rapzak

Description

@rapzak

Make an option to increase buffersize from user code...

Std settings on CDC as today gives ~200kbytes/sec
with increased buffer gives ~600kbytes/sec

Maybe make it posible to define custom buffers, but also pre-define.. like (low mem - std as today - medium and max mem...)
I have not troed to increase further to see more impact yet...

My changes to archieve 600kbyte:

// CHANGE CHANGE CHANGE
//.pico-sdk\sdk\2.1.0\src\rp2_common\pico_stdio_usb\include\tusb_config.h
//#define CFG_TUD_CDC_RX_BUFSIZE (256)
//#define CFG_TUD_CDC_TX_BUFSIZE (256)
#define CFG_TUD_CDC_RX_BUFSIZE 1024// (TUD_OPT_HIGH_SPEED ? 512 : 64)
#define CFG_TUD_CDC_TX_BUFSIZE 1024// (TUD_OPT_HIGH_SPEED ? 512 : 64)
// CDC Endpoint transfer buffer size, more is faster
#define CFG_TUD_CDC_EP_BUFSIZE 1024// (TUD_OPT_HIGH_SPEED ? 512 : 64)
// CHANGE CHANGE CHANGE END

I am not sure how to implement so it can be used from user code...

https://forums.raspberrypi.com/viewtopic.php?t=382388&sid=2e6f8d406c39944527e79819b0714d32

Thank you

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions