summaryrefslogtreecommitdiff
path: root/keyboards/durgod/k3x0
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/durgod/k3x0')
-rw-r--r--keyboards/durgod/k3x0/config.h3
-rw-r--r--keyboards/durgod/k3x0/halconf.h2
-rw-r--r--keyboards/durgod/k3x0/readme.md70
-rw-r--r--keyboards/durgod/k3x0/rules.mk7
4 files changed, 55 insertions, 27 deletions
diff --git a/keyboards/durgod/k3x0/config.h b/keyboards/durgod/k3x0/config.h
index ef73a71016..691076ecac 100644
--- a/keyboards/durgod/k3x0/config.h
+++ b/keyboards/durgod/k3x0/config.h
@@ -23,6 +23,8 @@
#define VENDOR_ID 0xD60D
#define MANUFACTURER Hoksi Technology
+#define WAIT_US_TIMER GPTD3
+
/* key matrix size (rows in specific keyboard variant) */
#define MATRIX_COLS 16
@@ -38,7 +40,6 @@
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
-// #define USB_POLLING_INTERVAL_MS 1
/* Bootmagic Lite key configuration */
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE
diff --git a/keyboards/durgod/k3x0/halconf.h b/keyboards/durgod/k3x0/halconf.h
index fa20fe30a9..d2a9d8c7c0 100644
--- a/keyboards/durgod/k3x0/halconf.h
+++ b/keyboards/durgod/k3x0/halconf.h
@@ -19,4 +19,6 @@
#define HAL_USE_PAL TRUE
#define PAL_USE_CALLBACKS TRUE
+#define HAL_USE_GPT TRUE
+
#include_next <halconf.h>
diff --git a/keyboards/durgod/k3x0/readme.md b/keyboards/durgod/k3x0/readme.md
index cbb170160c..62bb97d7ec 100644
--- a/keyboards/durgod/k3x0/readme.md
+++ b/keyboards/durgod/k3x0/readme.md
@@ -18,34 +18,62 @@ Instructions for building the K310 and K320 firmware can be found here:
### Initial Flash
-For first Flashing from initial Stock Firmware
+#### Requirements
-1. Back up original Firmware Image:
-- Unplug
-- Short Boot0 to Vdd (See below)
-- Plug In USB
-- Make a Flash Image's Backup in case you wanted to restore the Keyboard to Stock's Image:
- - Using dfu-util:
+- The Durgod K320/K310 - different batches have different controllers, so when opening the keyboard, you will have to make sure it's using SMT32 controller.
+- Another keyboard - when on bootloader mode, you can't use the keyboard to type and execute the commands (not really required if you can use any mouse interface to type and execute the commands).
+- 2 prying tools - to open the keyboard.
+- Another helping hand - it can be also done with just two hands, but it will require a lot of dexterity.
+- A small cable with both ends cut.
- dfu-util --list
- dfu-util --alt 0 --dfuse-address 0x08000000 --upload ${OLD_STOCK_BIN}
+#### Enter bootloader while using the original firmware
-2. Flash the QMK Firmware Image.
-- Put board into Bootloader mode, using the same method as when backing up the original Firmware (above)
-- Here are a few options for performing the initial Flash:
- - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox)
+1. Unplug USB cable.
+2. Open the keyboard case - there are plenty of youtube videos in that, but you will basically need 2 prying tools and a certain amount of force.
+3. After opening the keyboard, put the PCB upsides down, and the controller should be near the LEDs, and make sure it's using the right controller (SMT32).
+4. Use the cable to short Boot0 to Vdd, by shorting R21 to C27 on the sides closest to the processor, as shown:
+
+<img src="https://i.imgur.com/hvDnw5a.jpg" width="520" height="693" alt="Shorting Boot0 to Vdd on K320">
+
+5. While shorting both contacts as instructed in step 4, plug in the USB cable.
+6. When the USB cable is fully inserted, the LEDs should not turn on and the keyboard it's not able to type, you are probably on bootloader mode, to be sure:
+ - Using dfu-util, it should show something like "Found DFU…" after using this command:
+```
+dfu-util --list
+```
+
+Now that you are sure to be in bootloader mode, you can backup the original firmware and flash QMK Firmware.
+
+If it does not behave like described, remove the cable and go back to step 4.
+
+#### Backup original firmware
+
+1. Be in Bootloader mode.
+2. Execute this command to backup:
- Using dfu-util:
+```bash
+dfu-util -a 0 -d 0483:DF11 -s 0x08000000 -U k3x0_original.bin
+```
+
+#### Flash the QMK Firmware Image
- dfu-util --alt 0 --dfuse-address 0x08000000 --download ${NEW_QMK_BIN}
+1. Be in Bootloader mode.
+2. Here are a few options for performing the initial Flash:
+ - Using [QMK Toolbox](https://github.com/qmk/qmk_toolbox)
+ - Using qmk on command line:
-You can short Boot0 to Vdd by shorting R21 to C27 on the sides closest to the processor, as shown:
+```bash
+# k310
+qmk flash -kb durgod/k3x0/k310 -km default
-<img src="https://i.imgur.com/hvDnw5a.jpg" width="520" height="693" alt="Shorting Boot0 to Vdd on K320">
+# k320
+qmk flash -kb durgod/k3x0/k320 -km default
+```
### Subsequent Flashing
-For repeating Flashing you can use BootMagic:
-- BootMagic Lite has been enabled with Assigned "Esc" key
-- Unplug USB Cable
-- Holding Esc Button
-- Plug in USB Cable, Keyboard should be in ST-Bootloader state
+For repeating Flashing you can use BootMagic Lite has been enabled by default and assigned to the "Esc" key:
+
+1. Unplug USB Cable.
+2. Hold the "Esc" key.
+2. Plug in the USB Cable, the Keyboard should be in ST-Bootloader state.
diff --git a/keyboards/durgod/k3x0/rules.mk b/keyboards/durgod/k3x0/rules.mk
index 827f223653..bccaec46b3 100644
--- a/keyboards/durgod/k3x0/rules.mk
+++ b/keyboards/durgod/k3x0/rules.mk
@@ -12,15 +12,12 @@ BOOTLOADER = stm32-dfu
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite
+BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
-NKRO_ENABLE = yes # USB Nkey Rollover
+NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output