]> git.donarmstrong.com Git - qmk_firmware.git/blob - FAQ.md
Updated FAQ (markdown)
[qmk_firmware.git] / FAQ.md
1 # Documents You Need To Read
2 Read these yet?
3  
4 1. First **README** under top directory : https://github.com/tmk/tmk_keyboard/blob/master/README.md
5 2. For **Build**: https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md
6 3. And **README** under each project(keyboard/converter) directory
7
8 Note that you should read two **README**.
9
10
11 # Build
12 ## How to Build
13 See this first!
14 https://github.com/tmk/tmk_keyboard/blob/master/doc/build.md
15
16 In short,
17
18     $ make clean
19     $ make [KEYMAP=...]
20
21
22 ## Do 'make clean' before 'make'
23 You'll need `make clean` after you edit **config.h** or change options like `KEYMAP`.
24
25 Frist remove all files made in previous build,
26
27     $ make clean
28
29 then build new frimware. 
30
31     $ make [KEYMAP=...]
32
33 Also you can always try `make clean` when you get other strange result during build.
34
35
36 ## WINAVR is obsolete
37 It is no longer recommended and may cause some problem.
38 See [Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
39
40 ## USB stack: LUFA or PJRC?
41 Use **LUFA**.
42
43 **PJRC** stack won't be supported actively anymore. There is no reason to hesitate to use LUFA except for binary size(about 1KB lager?). But **PJRC** is still very useful for debug and development purpose.
44 See also [Issue #50](https://github.com/tmk/tmk_keyboard/issues/50) and [Issue #58](https://github.com/tmk/tmk_keyboard/issues/58).
45
46
47 ## Edit configuration but not change
48 Try these.
49 ### 1. make clean
50 This will be needed when you edit **config.h**.
51
52 ### 2. Remove Drivers from Device Manager(Windows)
53 Windows only. Linux, OSX and other OS's doesn't require this. It looks like Windows keeps using driver installed when device was connected first time even after the device changes its configuration. To load proper drivers for new configuration you need to remove existent drivers from **Drvice Manager**.
54
55 You will need this after editing `CONSOLE_ENABLE`, `NKRO_ENABLE`, `EXTRAKEY_ENABLE` or `MOUSEKEY_ENABLE` option in **Makefile**.
56
57
58 # Keymap
59 ## Power key doesn't work
60 Use `KC_PWR` instead of `KC_POWER` or vice versa.
61 - `KC_PWR` works with Windows and Linux, not with OSX.
62 - `KC_POWER` works with OSX and Linux, not with Windows.
63
64 http://geekhack.org/index.php?topic=14290.msg1327264#msg1327264
65
66
67
68 # Degug Console
69 ## hid_listen can't find device
70 When debug console of your device is not ready you will see like this:
71
72     Waiting for device:.........
73
74 once the device is pluged in then *hid_listen* finds it you will get this message:
75
76     Waiting for new device:.........................
77     Listening:
78
79 Check if you can't get this 'Listening:' message:
80 - build with `CONSOLE_ENABLE=yes` in **Makefile**.
81
82 ## Can't get message from console
83 Check:
84 - connect the device to *hid_listen*. See above.
85 - push **LShift+RShift+d** to enable debug. See [Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands).
86 - set `debug_enable=yes` usually in `matrix_init()` in **matrix.c**.
87 - try using 'print' function instead of debug print. See **common/print.h**.
88 - disconnect other devices with console function. See [Issue #97](https://github.com/tmk/tmk_keyboard/issues/97).
89
90 ***
91
92 # Miscellaneous
93 ## NKRO Doesn't work
94 1. Build with this option of Makefile
95
96     NKRO_ENABLE = yes
97
98 2. After boot keyboard may be in **boot mode**(6KRO), you will need to replug keyboard to enable NKRO.
99
100 3. Or use `Magic` **N** command to toggle NKRO function.(`LShift+RShift+N` by default)
101
102
103
104 ## TrackPoint needs reset circuit(PS/2 mouse support)
105 Without reset circuit you will have inconsistent reuslt due to improper initialize of the hardware. See circuit schematic of TPM754.
106
107 - http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
108 - http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
109
110
111 ## Can't read comlumn of matrix beyond 16 
112 Use `1UL<<16` intead of `1<<16` in `read_cols()` in **matrix.h** when your columns goes beyond 16.
113
114 In C `1` means one of **int** type which is **16bit** in case of AVR so you can't shift left more than 15. You will get unexpected zero when you say `1<<16`. You have to use **unsigned long** type with `1UL`.
115
116 http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
117
118
119
120 ## Pull-up Resistor
121 In some case converters needed to have pull-up resistors to work correctly. Place the resistor between VCC and signal line in parallel.
122
123 ```
124 Keyboard       Conveter
125                ,------.
126 5V------+------|VCC   |
127         |      |      |
128         R      |      |
129         |      |      |
130 Signal--+------|PD0   |
131                |      |
132 GND------------|GND   |
133                `------'
134 R: 1K Ohm resistor
135 ```
136
137
138 ## Arduino Micro's pin naming is confusing
139 Note that Arduino Micro PCB marking is different from real AVR port name. D0 of Arduino Micro is not PD0, PD0 is D3. Check schematic yourself.
140 http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
141
142
143
144 ## Bootloader jump doesn't work
145 Properly configure boot section size in Makefile. With wrong section size bootloader won't probably start with **Magic command** and **Boot Magic**.
146 - https://github.com/tmk/tmk_keyboard#magic-commands
147 - https://github.com/tmk/tmk_keyboard#bootloader
148
149 ```
150 # Boot Section Size in *bytes*
151 #   Teensy halfKay   512
152 #   Teensy++ halfKay 1024
153 #   Atmel DFU loader 4096       (TMK Alt Controller)
154 #   LUFA bootloader  4096
155 #   USBaspLoader     2048
156 OPT_DEFS += -DBOOTLOADER_SIZE=4096
157 ```
158 http://geekhack.org/index.php?topic=12047.msg1292018#msg1292018
159
160
161 ## Special Extra key doesn't work(System, Audio control keys)
162 You need to define `EXTRAKEY_ENABLE` in **makefile** to use them in TMK.
163 ```
164 EXTRAKEY_ENABLE = yes          # Audio control and System control
165 ```
166 http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-60.html#p157919
167
168
169 ## Wakeup from sleep doesn't work
170 In Windows check `Allow this device to wake the computer` setting in Power **Management property** tab of **Device Manager**. Also check BIOS setting.
171
172 Pressing any key during sleep should wake host.
173
174
175 ## Using Arduino?
176 **Note that Arduino pin naming is different from actual chip.** For example, Arduino pin `D0` is not `PD0`. Check circuit with its schematics yourself.
177
178 - http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
179 - http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
180
181 Arduino leonardo and micro have **ATMega32U4** and can be used for TMK, though Arduino bootloader may be a problem.
182
183
184 ## Using PF4-7 pins of USB AVR?
185 You need to set JTD bit of MCUCR yourself to use PF4-7 as GPIO. Those pins are configured to serve JTAG function by default. MCUs like ATMega*U* or AT90USB* are affeteced with this.
186
187 If you are using Teensy this isn't needed. Teensy is shipped with JTAGEN fuse bit unprogrammed to disable the function.
188
189 See this code.
190 ```
191     // JTAG disable for PORT F. write JTD bit twice within four cycles.
192     MCUCR |= (1<<JTD);
193     MCUCR |= (1<<JTD);
194 ```
195 https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hbkb/matrix.c#L67
196
197 And read **26.5.1 MCU Control Register – MCUCR** of ATMega32U4 datasheet.