Timeout exit from the boot loader

I am developing an application that uses NCS2.8.0.

For FW updates, the nRF52833 USB ACM bootloader is enabled.

However, there are some problem.

My device has a battery but no reset button, so the application cannot start unless I reset it with mcumgr.

Since we do not want to unnecessarily expose the bootloader to users, bootloader startup cannot be used at any time.

The bootloader timeout seems to only be effective if the bootloader always starts after a reset.

Is it possible to only enable the bootloader timeout?
Or can I exit the bootloader by other means (e.g. user switch)?
Parents
  • Hello,

    Please correct me if I'm wrong, but is my understanding correct that you're fine with the bootloader always enter serial recovery mode on startup, but you prefer not to expose any mcumgr commands in the application?

    Thanks,

    Vidar

  • No, I don't want the bootloader to start during normal boot.

    In other words, the bootloader will only start with
    bootmode_set(BOOT_MODE_TYPE_BOOTLOADER);

  • Then you need to select CONFIG_BOOT_SERIAL_BOOT_MODE and CONFIG_RETENTION_BOOT_MODE

    instead of CONFIG_BOOT_SERIAL_WAIT_FOR_DFU in your bootloader as explained here: https://docs.zephyrproject.org/latest/services/retention/index.html#boot-mode 

    The bootloader is always executed first in the boot sequence, but bootmode_set() can be used to signal to the bootloader on next boot whether it should enter serial recovery (DFU) mode or proceed to boot the application.

Reply Children
  • The bootloader is starting fine.

    If no bootloader operation is performed by mcumgr for a certain period of time, I want to terminate the bootloader and start an application.

  • After the bootloader starts, if no operations are performed for, say, one minute, is it possible to start an application?

  • CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT only works in conjunction with CONFIG_BOOT_SERIAL_WAIT_FOR_DFU. If you want the same timeout for other entry methods you will need to modify the bootloader.

  • Is there a way to exit mcuboot using a button (not the reset button)?

  • It is possible, but this is also something that will require customization of the bootloader.