From bf0c0e9c97445cfb9c975e0b82bc1653d3645950 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sun, 5 Sep 2021 01:53:42 +0200 Subject: [PATCH] Make i2c flasger reset the app block flag --- i2c-flasher.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/i2c-flasher.c b/i2c-flasher.c index 2515301..905e7cb 100644 --- a/i2c-flasher.c +++ b/i2c-flasher.c @@ -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[]) } 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);