Hello,
I am working on developing a special "serial recovery" mode dfu function of nrf52833 with ncs SDK V2.3.0.
Now I encount a problem when adding the following code in my personal project for buttonless DFU, but it cannot stay in bootloader. Can anyone help me?
uint8_t val = nrf_power_gpregret_get(NRF_POWER); printk("Old GPREGRET val: %u\n", val); nrf_power_gpregret_set(NRF_POWER, 0xb1); k_sleep(K_MSEC(1000)); NVIC_SystemReset();
I also try debugging and found the modem will reboot and jump to the "if" condition as follow:(/ncs/v2.6.0/bootloader/mcuboot/boot/zephyr/main.c line:), then check the IF statement fails, then jump to the end and enter application.
if (detect_pin() && !boot_skip_serial_recovery()) {#ifdef CONFIG_MCUBOOT_INDICATION_LED gpio_pin_set_dt(&led0, 1);#endif mcuboot_status_change(MCUBOOT_STATUS_SERIAL_DFU_ENTERED); BOOT_LOG_INF("Enter the serial recovery mode"); rc = boot_console_init(); __ASSERT(rc == 0, "Error initializing boot console.\n"); boot_serial_start(&boot_funcs); __ASSERT(0, "Bootloader serial process was terminated unexpectedly.\n"); }#endifbut I didn't find any infomation about gpregret, could you please tell me how to enter boot serial start process?
best regard!
Ben