Browse Source

Make i2c flasger reset the app block flag

master
Ondrej Jirman 1 year ago
parent
commit
bf0c0e9c97
  1. 5
      i2c-flasher.c

5
i2c-flasher.c

@ -410,7 +410,7 @@ int main(int ac, char* av[]) @@ -410,7 +410,7 @@ int main(int ac, char* av[])
if (i == 10)
error("Reset command issued over I2C failed, stock firmware failed to report itself within 2.5s");
} else if (!strcmp(entry_type, "manual")) {
printf("Please power off the keyboard by holding the keyboard power key for > 12s, then release the power key and press it shortly, once, to power it on again.\n");
printf("Please power cycle the keyboard by removing and reinserting the pinephone.\n");
while (true) {
if (is_kb_stock_connected()) {
@ -488,6 +488,9 @@ int main(int ac, char* av[]) @@ -488,6 +488,9 @@ int main(int ac, char* av[])
} else if (!strcmp(av[i], "reset")) {
printf("Restarting the MCU\n");
uint8_t cmd1[] = {0};
wr_buf(REG_SYS_USER_APP_BLOCK, cmd1, sizeof cmd1);
// send MCU reset command
uint8_t cmd[] = {REG_SYS_COMMAND_MCU_RESET};
wr_buf(REG_SYS_COMMAND, cmd, sizeof cmd);

Loading…
Cancel
Save