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
16k USB devices and Chibios.
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
-
ulikoehler
- Posts: 71
- Joined: Tue Mar 17, 2015 2:32 am
- Been thanked: 3 times
Re: 16k USB devices and Chibios.
No, I only have the one serial thread and the main (idle) thread does nothing...
Uli
Uli
- Giovanni
- Site Admin
- Posts: 14893
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: 16k USB devices and Chibios.
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
Alternatively try compiling with -O0.
Giovanni