Skip to content

Commit

Permalink
sn32: add to flashing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dexter93 committed Sep 19, 2024
1 parent f04cb66 commit d36bb3c
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions docs/flashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -465,3 +465,45 @@ CLI Flashing sequence:
4. Wait for the keyboard to become available

<sup>1</sup>: This works only if the controller has been flashed with QMK Firmware with `RP2040_BOOTLOADER_DOUBLE_TAP_RESET` defined.

## SN32 DFU

All SN32 MCUs, except for 260<sup>1</sup> come preloaded with a factory bootloader that cannot be modified nor deleted.

To ensure compatibility with the SN32-DFU bootloader, make sure this block is present in your `rules.mk` :

```make
# Bootloader selection
BOOTLOADER = sn32-dfu
```

Compatible flashers:

* [SonixQMKToolbox](https://github.com/SonixQMK/qmk_toolbox/releases) (recommended GUI)
* [sonixflasher](https://github.com/SonixQMK/SonixFlasherC/releases) / `:flash` target in QMK (recommended command line)
* [sonix-flasher](https://github.com/SonixQMK/sonix-flasher/releases) (old GUI - known to cause issues)
```
sonixflasher --vidpid 0c45:7040 -f <filename>
```
<sup>1</sup>: 260 series of chips have part of the SN32-DFU bootloader in userspace and therefore must be guarded to avoid bricking. Install the [sonix-bootloader](https://github.com/SonixQMK/sonix-keyboard-bootloader) before flashing the firmware
```
sonixflasher --vidpid 0c45:7010 -j -f <bootloader_filename>
```
as a one-shot operation, then flash the firmware with an offset `0x200`
```
sonixflasher --vidpid 0c45:7010 -o 0x200 -f <filename>
```

If using `$ qmk flash` to flash a firmware, the offset is automatically applied if needed.

Flashing sequence:

1. Enter the bootloader using any of the following methods:
* Tap the `QK_BOOT` keycode
* If a reset circuit is present, tap the `RESET` button on the PCB; some boards may also have a toggle switch that must be flipped
* Otherwise, you need to bridge `BOOT` to GND (via `BOOT` button or jumper), short `RESET` to GND (via `RESET` button, jumper or by unplugging and replugging USB), and then let go of the `BOOT` bridge
2. Wait for the OS to detect the device
3. Flash a .bin file
4. Wait for the keyboard to become available

0 comments on commit d36bb3c

Please sign in to comment.