The transfer large amounts of data through the USB CDC

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
kiv
Posts: 10
Joined: Fri Aug 07, 2015 5:14 pm

The transfer large amounts of data through the USB CDC

Post 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?
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

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

Post 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
kiv
Posts: 10
Joined: Fri Aug 07, 2015 5:14 pm

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

Post 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.
Post Reply