# Keyboard stuck in Bootloader mode

**URL:** <https://forum.clockworkpi.com/t/keyboard-stuck-in-bootloader-mode/8830>\
**Category:** DevTerm\
**Tags:** hardware, keyboard\
**Created:** [August 15, 2022, 10:02am UTC](https://forum.clockworkpi.com/t/keyboard-stuck-in-bootloader-mode/8830 "2022-08-15T10:02:41Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![yatli](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/yatli/32/6253_2.png) [@yatli](https://forum.clockworkpi.com/u/yatli)\
**Post date:** [August 16, 2022, 3:46pm UTC](https://forum.clockworkpi.com/t/keyboard-stuck-in-bootloader-mode/8830/2 "2022-08-16T15:46:52Z")

</div>

Try comment out Line 47 in the firmware:

> <https://github.com/clockworkpi/DevTerm/blob/182dedb6759ddfc6b8059af1a40617196ad32ab5/Code/devterm_keyboard/devterm_keyboard.ino#L47>

I also had this problem during my development of custom keyboard fw.  
It would get stuck in the loop and the host cannot enumerate the device.

My first workaround was to comment out L47.  
Later on I developed a theory (which seems correct) that `while(!USBComposite)` is too busy and would block the usb interrupts.  
This worked far more reliably:

> <https://github.com/yatli/DevTerm/blob/075fbfb2bfceaad68271ce8d22e24f88aa0ac359/Code/devterm_keyboard/devterm_keyboard.ino#L52-L61>

---

_[View the full topic](https://forum.clockworkpi.com/t/keyboard-stuck-in-bootloader-mode/8830)._
