Fix RESET not working for keyboards with Kiibohd bootloader (#15430)
parent
7f90cb1781
commit
755731f0ba
|
@ -290,7 +290,7 @@ Compatible flashers:
|
||||||
Flashing sequence:
|
Flashing sequence:
|
||||||
|
|
||||||
1. Enter the bootloader using any of the following methods:
|
1. Enter the bootloader using any of the following methods:
|
||||||
* Tap the `RESET` keycode (this may only enter the MCU into a "secure" bootloader mode; see https://github.com/qmk/qmk_firmware/issues/6112)
|
* Tap the `RESET` keycode
|
||||||
* Press the `RESET` button on the PCB
|
* Press the `RESET` button on the PCB
|
||||||
2. Wait for the OS to detect the device
|
2. Wait for the OS to detect the device
|
||||||
3. Flash a .bin file
|
3. Flash a .bin file
|
||||||
|
|
|
@ -123,7 +123,7 @@ void enter_bootloader_mode_if_requested(void) { /* Jumping to bootloader is not
|
||||||
# if defined(BOOTLOADER_KIIBOHD)
|
# if defined(BOOTLOADER_KIIBOHD)
|
||||||
/* Kiibohd Bootloader (MCHCK and Infinity KB) */
|
/* Kiibohd Bootloader (MCHCK and Infinity KB) */
|
||||||
# define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000
|
# define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000
|
||||||
const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff";
|
const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
||||||
__attribute__((weak)) void bootloader_jump(void) {
|
__attribute__((weak)) void bootloader_jump(void) {
|
||||||
void *volatile vbat = (void *)VBAT;
|
void *volatile vbat = (void *)VBAT;
|
||||||
__builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));
|
__builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic));
|
||||||
|
|
Loading…
Reference in New Issue