diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c index b62cfa9c..d588e4de 100644 --- a/tmk_core/protocol/chibios/main.c +++ b/tmk_core/protocol/chibios/main.c @@ -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 */