]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Chibios: Fix a HardFault bug (wait after start).
authorflabbergast <s3+flabbergast@sdfeu.org>
Thu, 11 Feb 2016 21:12:19 +0000 (21:12 +0000)
committerflabbergast <s3+flabbergast@sdfeu.org>
Thu, 11 Feb 2016 21:12:29 +0000 (21:12 +0000)
tmk_core/protocol/chibios/main.c

index b62cfa9c57e8392131e652be40135b69a41ef376..d588e4de06f9beaab67e8fa82dae5755d1bc2a13 100644 (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 */