ZMK - rittme/nrfmicro GitHub Wiki
Modern, open source Zephyr-based wireless keyboard firmware. Probaby the best choice for now. Also see QMK.
- https://zmkfirmware.dev (official site)
- https://github.com/zmkfirmware/zmk (official ZMK repository)
Note that nRFMicro and Jorne are officially supported now. Read official documentation here:
(Before calling west, set up Zephyr environment, as here https://zmkfirmware.dev/docs/development/setup)
Building jorne (looks like nrfmicro is still not in the build.yml so you'd have to use command line):
git clone https://github.com/joric/zmk
cd zmk && git checkout jorne
west build -p -b nrfmicro_13 -- -DSHIELD=jorne_left
west build -p -b nrfmicro_13 -- -DSHIELD=jorne_right
See https://github.com/joric/nrfmicro/wiki/Batteries#zmk
I built ZMK firmware for my Jorne keyboard. You may download binares and code.
This is the latest ZMK (clone the repo to rebuild and download artifacts, or get firmware.zip from releases):
Keymap editor (fork the repository above and use it on your fork):
This is really outdated and includes patches that are already in the mainstream ZMK but you can peek RGB configuration here.
Direct links to the latest release with RGB sync (this is for nRFMicro 1.3+, double press reset and upload .uf2 to disk as usual):
- jorne_left_nrfmicro_13_rgb.uf2 (central)
- jorne_right_nrfmicro_13_rgb.uf2 (peripheral, won't work without central)
You may also need erasing the flash to reset bonds if nothing else helps:
Direct link to releases section:
- https://github.com/joric/zmk/releases (sorry I'm not maintaining it too actively)
This firmware supports OLED screens, per-key RGB leds and VCC power saving.
- https://github.com/joric/zmk/tree/jorne (my base repository)
I had to merge a few patches into my base repository, some are already merged to upstream (follow zmk github)
- https://github.com/zmkfirmware/zmk/pull/675 adds delayed init after wakeup, fixes OLED and other issues (closed)
- https://github.com/zmkfirmware/zmk/issues/288 autorepeat of multitap keys, e.g. shift + backspace (closed)
- https://github.com/zmkfirmware/zmk/pull/547 RGB is sometimes out of sync, this patch fixes that (merged locally)
- https://github.com/zmkfirmware/zmk/pull/516 ties RGB Underglow into sleep statuses
- https://github.com/zmkfirmware/zmk/pull/669 sets RGB min, max and start brightness
RGBTOG currently toggles VCC as well (CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
). There's no sleep mode or lock shortcuts in ZMK just yet, sleep mode as automatic (15 minutes).
- Raise + Lower + ~ Turn RGB and OLED off (essentially turns off VCC, key matrix still works)
- Raise + Lower + Shift Reset Bluetooth bonds
See full keymap here:
- VCC management seems fine with the latest ZMK, no leak, checked with 26 LEDs per each half, but it needs manual turning off with a shortcut (currently it's tied to RGBTOG). Key matrix still works even with VCC off, it only turns off OLED and RGB.
- OLED initialization is static in Zephyr so it only works if VCC is enabled on startup. To check if OLEDs work, enable RGB+VCC using RGBTOG key binding, then wait at least a minute. After that, that'd be stored to settings and restored at startup/reset (fixed in #674, #675 so you may want to pull fresh ZMK)
- https://github.com/petejohanson/zephyr/tree/display/il0323-initial-driver (e-ink driver)
- https://www.waveshare.com/wiki/1.02inch_e-paper_Module 1.02" displays used by Corne-ish Zen
- https://www.aliexpress.com/af/Waveshare-1.02inch.html 1.02" displays on aliexpress
- Version 3 of the e-ink boards are ordered. Third time's the charm, right? (discord)
- https://github.com/Nicell/epaper-102 Nicell open sourced 1.02" display module PCB to use with ZMK
- https://www.aliexpress.com/item/4000504958641.html Cheapest 1.02" display on Aliexpress
See my article about trackpoints: https://github.com/joric/jorne/wiki/Trackpoint There are currently 2 problems:
- nobody tried trackpoint at 3.3v (edit: tried, it works)
- all trackpoints are ps/2 and there's no ps/2 support in ZMK (there's ps/2 driver in zephyr though)
- https://docs.zephyrproject.org/latest/reference/peripherals/ps2.html (Zephyr ps/2 driver)
TL;DR: trackpoints work with ps/2 Arduino library at 3.3V just fine. There's no ZMK support just yet.
Instructions on how to configure ZMK to work with nrf52833.
Taken from https://github.com/ci-bus/zmk-nrf52833, also see https://github.com/zmkfirmware/zmk/pull/912.
Let's first see some differences between E73 2G4M08SIE (nrf52833) and E73 2G4M08S1C (nrf52840)
E73 2G4M08S1C (nrf52840) | E73 2G4M08SIE (nrf52833) | |
---|---|---|
Memory | 1024 kB | 512 kB |
RAM | 256 kB | 128 kB |
Pin 1 | P1.11 | Not connected |
Pin 25 | DCCH | Not connected |
DC / DC output | Yes | No |
SD | Yes | Insufficient memory |
Partitions | nrf52840 | nrf52833 |
---|---|---|
SD / MBR partition | 152kB | 4kB |
CODE partition | 792kB | 428kB |
Storage partition | 32kB | 32kB |
Boot partition | 48kB | 48kB |
- Flash the pca10100_bootloader-0.6.2_s140_6.1.1.hex file from this repository
- Connected by USB it should appear as a memory or pendrive, copy the file update-pca10100_bootloader-0.6.2_nosd.uf2
Since with nrf52833 we only have 428kB available it will not be possible to have a screen, or if you have one it must be with a very limited code, the basic zmk code for a 60% keyboard with two layers working via usb and bluetooth needs 312kB, if a that we add the functionality of rgb underglow rises to 328kB
Let's see what configurations to do, these examples are based on a board arm like nice_nano or nrfmicro
- Change the SOC settings in the ** _ config.c ** file
CONFIG_SOC_NRF52833_QIAA = y
- Change base dtsi import and definition of partitions in the **. Dts ** file
#include <nordic / nrf52833_qiaa.dtsi>
& flash0 {
partitions {
compatible = "fixed-partitions";
# address-cells = <1>;
# size-cells = <1>;
sd_partition: partition @ 0 {
label = "mbr";
reg = <0x00000000 0x00001000>;
};
code_partition: partition @ 1000 {
label = "code_partition";
reg = <0x00001000 0x0006b000>;
};
storage_partition: partition @ 6c000 {
label = "storage";
reg = <0x0006c000 0x00008000>;
};
boot_partition: partition @ 74000 {
label = "adafruit_boot";
reg = <0x00074000 0x0000c000>;
};
};
};
- Change in the ** CMakeLists.txt ** file the position where you start writing the code
-b 0x1000
With these changes we can now enjoy ZMK on our nrf52833 chip
The bootloader comes from the adafruit repo, to flash the micro you must press reset twice very quickly that will make it appear as a pendrive, then copy the .uf2 file generated by ZMK.
There are also nRFMicro-customized bootloaders (nRF52833 only, for 2G4M08S1E modules):
- https://github.com/joric/nrfmicro/releases/download/1.4/nrfmicro_833_bootloader-0.6.2-12-ga93b31d-dirty_s140_6.1.1.hex
- https://github.com/joric/nrfmicro/releases/download/1.4/nrfmicro_833_bootloader-0.6.2-12-ga93b31d-dirty_nosd.hex
Displays seem to work with the latest ZMK, and there's apparently some program space left for RGB as well.
Memory region Used Size Region Size %age Used
FLASH: 265184 B 280 KB 92.49%
SRAM: 55791 B 128 KB 42.57%
IDT_LIST: 0 GB 2 KB 0.00%
There is no feature set in which the 833 bests the 840, but E73-C is just not available anymore, and E73-E is the same price now that the E73-C was before so there's basically no practical benefit to the 840.
Super cool guide by @ebastier (features Holyiot 18010 and overdischarge protection for 18650s)
- https://deploy-preview-312--zmk.netlify.app/power-profiler/ ZMK power profiler