Problem sending data if length is les than usb in endpoint

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem sending data if length is les than usb in endpoint

922 次查看
PedroBecerra
Contributor III

I'm using cdc comunication with USB stack 4.1.1 and I have problems if the string I wnat to send is smaller or equal to the In Endpoint size.

If my string is longer everything is ok.

If my string is equal never is sent.

If my string is shorter it's sent 3 or 4 times and after I never can send anything more.

At the moment I've made a workarround and if the string length is les than endpoint size I complete it with 0x00. And this way it works perfect. But this is not a solution. On the other side of the cominication I should throw away those 0x00 and maybe some of them could be part of my message.

0 项奖励
回复
1 回复

704 次查看
mjbcswitzerland
Specialist V

Hi

If you prefer simple, fast and reliable CDC (rather than fixing the examples) just get it from here: http://www.utasker.com/kinetis.html

There are many binaries showing CDC with up to 6 USB-UART bridges and composites (probably one will run on boards you use).
5 year track record in many industrial Kinetis based products (and more in Coldfires).

All Kinetis devices are simulated, with accurate USB emulation to avoid any quess work.

Regards

Mark

Guides:
http://www.utasker.com/docs/uTasker/uTaskerV1.3_USB_Demo.PDF
http://www.utasker.com/docs/uTasker/USB_User_Guide.PDF
Also use for RNDIS - http://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf

0 项奖励
回复