Page 2 of 2
Re: 16k USB devices and Chibios.
Posted: Sat Sep 12, 2015 8:00 pm
by Giovanni
Removing that sleep probably makes some lower priority thread do not execute because the loop becomes continuous when the USB is not active. Do you have loweer priority threads?
Giovanni
Re: 16k USB devices and Chibios.
Posted: Sat Sep 12, 2015 8:02 pm
by ulikoehler
No, I only have the one serial thread and the main (idle) thread does nothing...
Uli
Re: 16k USB devices and Chibios.
Posted: Sat Sep 12, 2015 8:47 pm
by Giovanni
Could you try declaring USBDriver.state as volatile? I suspect the compiler optimizes it out if there is a function call in the loop (not just that sleep, any function). It is in usb_lld.h.
Alternatively try compiling with -O0.
Giovanni