Comments (6)
The intended fuse settings for the atmel-dfu
and qmk-dfu
bootloaders are described in the ISP flashing guide; however, that guide does not give a detailed explanation of those settings and the corresponding hardware configuration:
hfuse
=0x99
(theBOOTRST
fuse is not programmed), or0xD9
if you also want to disable JTAG immediately (but the QMK startup code would disable JTAG during early startup anyway).efuse
=0xF3
(theHWBE
fuse is programmed).- The PE2/HWB pin is pulled down (preferably with a resistor, so that flashing a firmware which tries to use the
E2
pin as output won't overload the pin, but a direct connection to GND could work too — apparently the reference Pro Micro design have it connected like that). - The RESET pin must not have a capacitor connected, so that RESET does not get pulled low when power is applied.
The original atmel-dfu
bootloader cannot handle the configuration with BOOTRST
enabled (the chip would be stuck in the bootloader). There is some code in qmk-dfu
which attempts to handle BOOTRST
, but apparently that code does not work correctly. Instead of using BOOTRST
, those bootloaders rely on HWBE
(and a somewhat underdocumented detail that the state of the HWB pin does not affect the behavior of the power-on reset).
The requirement to pull the E2
pin down prevents the usage of that pin in the matrix, but you can still use that pin for some tasks that are compatible with the pull-down — e.g., lots of ATmega32U4-based boards use that pin as WS2812_DI_PIN
.
from qmk_firmware.
That pin (PE2/HWB
) is currently not connected to anything in my design. That's probably the source of my problem.
My RESET
pin is connected to VCC
via a pull-up resistor. Is that fine?
from qmk_firmware.
Yes, having the PE2/HWB pin floating won't work if you intend to enable the HWBE
fuse; however, your efuse
value also does not enable HWBE
.
Having a pull-up on the RESET pin is fine; but some people also add a capacitor “just for a good measure” (and, e.g., STM32 datasheets recommend having a capacitor on the NRST pin to protect against spurious resets), and adding that capacitor breaks startup when the HWBE
fuse is enabled (it effectively converts the power-on reset, which normally ignores the state of the HWB pin, into an external reset, which uses the HWB pin).
The caterina
bootloader probably does not need the external PE2/HWB connection, because with that bootloader you need to disable the HWBE
fuse and enable the BOOTRST
fuse instead; however, that bootloader is very annoying for users, so you should not use it if you have any other options.
Maybe it could be possible to fix the lufa-dfu
/qmk-dfu
code to work correctly with the BOOTRST
configuration, but that would require modifying the LUFA code (the bootloader sources actually live there).
from qmk_firmware.
I shorted pin 33 (PE2
/HWB
) to ground. I set the high fuse to 0x99
and extended fuse to 0xF3
. My results were:
- Physical reset (shorting the
RESET
pin to ground) --> bootloader mode QK_BOOT
keycode --> bootloader mode
That solves my bootloader issue!
What is BOOTRST
? What is HWBE
? How are they related?
from qmk_firmware.
These are fuse bits, described in the ATmega32U4 datasheet:
(the documentation is not ideal — e.g., it mentions the ALE name for the HWB pin, but ATmega32U4 does not support the ALE function for that pin — that function is present in some other chips though).
from qmk_firmware.
Thank you for the help!
from qmk_firmware.
Related Issues (20)
- Two questions HOT 3
- Add KB29B-01 keyboard HOT 1
- Add Missing Keymappings for Czech Language on macOS HOT 6
- [Bug] Tofu60 unable to wake from sleep on Linux HOT 4
- [Bug] Modifier should be sent before regular key HOT 1
- [Bug] Mod-tap doesn't work with KC_TRANSPARENT HOT 3
- [Bug] Wrong keycode used to change volume on sofle's via keymap HOT 2
- [Bug] Bottom row of Corne Keyboard issues HOT 1
- [Bug] warning:The official repository does not seem to be configured as git remote "upstream". HOT 12
- [Feature Request] Custom keycodes and axies for joysticks HOT 1
- [help] QMK Doc‘s “Flashing DFU Bootloader” cannot flash APM32。 HOT 1
- [Feature Request] Add Left Control and Alt key HOT 2
- [Bug] Most rules in 50-qmk.rules are missing MODE and GROUP for non-systemd distros HOT 4
- Keys are held down and keep repeating after waking from sleep.
- [Bug] If 4 rotary encoders are specified, all rotary encoders will stop responding. HOT 6
- [Bug] Caps Word get reset by normal press with interrupting character on long press HOT 2
- [Feature Request] Password manager/generator functionality HOT 1
- [Bug] Capslock randomly trigger while typing with Sofle V2 HOT 1
- Rotary Encoders - Microsoft flight simulator - MSFS Heading, Speed, Altitude Control HOT 2
- Strange behaviour of macros with lily58 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qmk_firmware.