Hello everyone,
I'm now working on a cdc_vcom_lite example on FRDM-KL27Z board with KSDK 2.0 and Keil uVision 5.
Now, I successfully send/receive characters from terminal app on Windows 10.
But when I send more than 64 bytes of characters from app, the device returns only 64 characters.
It seems bulk endpoint has 64 length for both directions and this might be the limitations on the example.
Is there any workaround to send/receive more than 64 bytes of characters (hopefully around 200 bytes) ?
So far I looked for solutions in the community but failed to find appropriate one.
Hi, all
I think the Endpoint Descriptor specifies the maximum data packet size.
This is endpoint descriptor contents,
0 bLength 1 Number Size of this descriptor in bytes
1 bDescriptorType 1 Constant Endpoint descriptor type(0x05)
2 bEndpointAddress 1 Endpoint The address of the endpoint on the USB device described by
this descriptor. The address is encoded as follows:
Bit 3...0: The endpoint number
Bit 6...4: Reserved, reset to zero
Bit 7: Direction, ignored for control endpoints
0 = OUT endpoint
1 = IN endpoint
4 wMaxPacketSize 2 Number Maximum packet size this endpoint is capable of sending or
receiving when this configuration is selected. For all
endpoints, bits 10..0 specify the maximum packet size (in
bytes). For high-speed isochronous and interrupt endpoints:
Bits 12..11 specify the number of additional transaction
opportunities per microframe:
00 = None(1 transaction / microframe)
01 = 1 additional (2 per microframe)
10 = 2 additional (3 per microframe)
11 = Reserved Bits 15..13 are reserved and must be set
to zero.
Hope it can help you
BR
XiangJun Rong
I might have understood the reason.
Both local buffers for send/receive have the same size as DATA_BUFFER_SIZE which refers FS_CDC_VCOM_BULK_OUT_PACKET_SIZE.
The length of it has 64 as bulk packet size so I think it limits the transfer length.
I' going to expand the DATA_BUFFER_SIZE.