aboutsummaryrefslogtreecommitdiff
path: root/keyboards/xiaomi/mk02/readme.md
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/xiaomi/mk02/readme.md')
-rw-r--r--keyboards/xiaomi/mk02/readme.md104
1 files changed, 104 insertions, 0 deletions
diff --git a/keyboards/xiaomi/mk02/readme.md b/keyboards/xiaomi/mk02/readme.md
new file mode 100644
index 000000000..2dea99ff1
--- /dev/null
+++ b/keyboards/xiaomi/mk02/readme.md
@@ -0,0 +1,104 @@
1# Xiaomi Yuemi Pro MK02
2
3A tenkeyless keyboard sold under Xiaomi brand. It uses an STM32F072C8T6 microcontroller and can be flashed with QMK.
4
5LED backlight is currently not supported.
6
7* Keyboard Maintainer: [@xyzz](https://github.com/xyzz)
8* Hardware Supported: Xiaomi Yuemi Pro MK02
9* Hardware Availability: Aliexpress
10
11Make example for this keyboard (after setting up your build environment):
12
13 make xiaomi/mk02:default
14
15See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
16
17## Installation
18
19Please understand that following these steps will void your warranty and might irrecoverably damage your keyboard.
20
21### Installing the bootloader
22
23You only need to do this step once (unless you destroy your user bootloader which is not possible so long as you follow these steps correctly).
24
25Unplug the keyboard. Disassemble the keyboard and look at the area around the MCU. Make sure your keyboard looks the same as in the picture and that the chip says STM32F072C8T6 on it:
26
27![mcu](https://i.imgur.com/HM8tUWU.jpg)
28
29Using a piece of wire, connect TP28 (indicated in red) and 3v3 (square pad indicated in green) together with tweezers or a piece of wire. Make sure to not touch the case with your wire when shorting!!! Don't push it all the way through the hole.
30
31Plug the keyboard in with the wire connected. You should see the following device appear:
32```
33[5067851.560317] usb 2-1.5.3.1: new full-speed USB device number 6 using ehci-pci
34[5067851.670006] usb 2-1.5.3.1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
35[5067851.670010] usb 2-1.5.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
36[5067851.670013] usb 2-1.5.3.1: Product: STM32 BOOTLOADER
37[5067851.670015] usb 2-1.5.3.1: Manufacturer: STMicroelectronics
38[5067851.670017] usb 2-1.5.3.1: SerialNumber: FFFFFFFEFFFF
39```
40
41If you don't see this, you did something wrong. Disconnect the keyboard and try again.
42
43If you do see this, remove the wire before continuing.
44
45Make a backup of internal flash memory in case you'd like to revert to the original firmware in the future:
46```
47dfu-util -d 0483:df11 -a 0 -s 0x08000000 -U flash-backup.bin
48```
49
50Ensure the dumped flash is correct:
51```
52strings flash.bin | grep KB
53```
54(You should see 2 entries of "USB KB")
55
56Finally, flash the bootloader ([jumploader-xiaomi_mk02-padded.bin](https://github.com/xyzz/stm32f072-keyboard-jumploader/releases/download/r1/jumploader-xiaomi_mk02-padded.bin)) with:
57```
58dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D jumploader-xiaomi_mk02-padded.bin
59```
60
61At this point the keyboard should reboot into bootloader mode; if it doesn't, wait a couple seconds and replug the USB cable.
62
63### Installing the firmware
64
65To install QMK, first boot into bootloader mode as detailed below. When the keyboard boots in bootloader mode, you should see the following device:
66
67```
68[5067851.560317] usb 2-1.5.3.1: new full-speed USB device number 6 using ehci-pci
69[5067851.670006] usb 2-1.5.3.1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
70[5067851.670010] usb 2-1.5.3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
71[5067851.670013] usb 2-1.5.3.1: Product: STM32 BOOTLOADER
72[5067851.670015] usb 2-1.5.3.1: Manufacturer: STMicroelectronics
73[5067851.670017] usb 2-1.5.3.1: SerialNumber: FFFFFFFEFFFF
74```
75
76Flash the keyboard normally by executing:
77
78```
79make xiaomi/mk02:default:flash
80```
81
82Warning! If you flash the firmware manually by using `dfu-util`, make sure to use the following arguments:
83
84```
85-d 0483:df11 -a 0 -s 0x08002000:leave
86```
87
88If you don't, you'll blow away the user bootloader and will have to repeat the installation steps.
89
90## Booting into bootloader
91
92To boot into bootloader, do either of the following:
93- map a RESET key in your keymap and tap it, or
94- hold spacebar while plugging in the keyboard.
95
96If neither of these work, you must have blown away the user bootloader somehow and will need to repeat the installation guide from the first step.
97
98## Restoring the original firmware
99
100If you wish to restore the original firmware, boot into the bootloader and then execute:
101
102```
103dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D flash-backup.bin
104```