1
0

Chibios: Fix a HardFault bug (wait after start).

This commit is contained in:
flabbergast 2016-02-11 21:12:19 +00:00
parent 72b1668340
commit fdf808ee24

View File

@ -101,6 +101,13 @@ int main(void) {
while(USB_DRIVER.state != USB_ACTIVE)
chThdSleepMilliseconds(50);
/* Do need to wait here!
* Otherwise the next print might start a transfer on console EP
* before the USB is completely ready, which sometimes causes
* HardFaults.
*/
chThdSleepMilliseconds(50);
print("USB configured.\n");
/* init TMK modules */