AVR-CDC How detect end of paket (paket length>8)?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Oleg

AVR-CDC How detect end of paket (paket length>8)?

Post by Oleg » Wed Jan 30, 2008 11:00 am

PC terminal program send variable lentgh paket (up to 256 byte).
Old MCU software (RS232 interface) detect end of paket use transfer timeout (MODBUS protocol).
Now I use AVR-CDC, how detect last 8byte frame in report d'not use timeout?

PS: I'm sorry, my english is poor.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Sun Feb 03, 2008 6:16 pm

Any real time protocol with tight time constraints gets into troubles with USB -> serial converters since the timing can usually not be exactly preserved.

USB CDC sends data on the stream endpoint when it is available. If no data is available, no data is sent. If the time resolution after going through the USB driver and the (non real-time) operating system is acceptable, this should still work.

Post Reply