Page 1 of 1

The transfer large amounts of data through the USB CDC

Posted: Fri Aug 07, 2015 9:56 pm
by kiv
I use chprintf and SerialUSBDriver, to transmit data to a computer. If frequently (10 Hz) to transmit the string longer than the size of the end point (64 bytes by default), the device hangs at an arbitrary moment. If transmit data infrequently (1 Hz) or less than the size of the end point, everything is normal. I probably did not properly use SerialUSBDriver, how to do it right?

Re: The transfer large amounts of data through the USB CDC

Posted: Fri Aug 07, 2015 9:58 pm
by Giovanni
Enable debug options in chconf.h and see if something is caught.

Info here: http://www.chibios.org/dokuwiki/doku.ph ... ebug_guide

Giovanni

Re: The transfer large amounts of data through the USB CDC

Posted: Fri Aug 07, 2015 10:30 pm
by kiv
I used GDB, to see the backtrace at the time when the microcontroller enters an infinite loop. And I see what happens assert failed because of a timeout communication I2C. Apparently I put too small a timeout and data transfer via USB microcontroller is too loaded. I increased the timeout and it worked. Thanks. Sorry.