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.

CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=2000
Is it possible to only enable the bootloader timeout?
Or can I exit the bootloader by other means (e.g. user switch)?
Parents Reply
  • I have reviewed the main.c code and it appears (interestingly) that CONFIG_BOOT_USB_DFU_WAIT is being used in two ways.

    1. If CONFIG_BOOT_USB_DFU_GPIO=n

    Pin DFU is not used - so, enters DFU mode for the duration of CONFIG_BOOT_USB_DFU_WAIT_DELAY_MS.

    2. If CONFIG_BOOT_USB_DFU_GPIO=y along with CONFIG_BOOT_USB_DFU_WAIT=y

    mcuboot does NOT enter DFU automatically. The CONFIG_BOOT_USB_DFU_GPIO rule changes the operation of CONFIG_BOOT_USB_DFU_WAIT. DFU is only entered if the DFU pin is active. DFU times out after CONFIG_BOOT_USB_DFU_WAIT_DELAY_MS.

    My observation is that DFU boot never exits if DFU has been started in any way, including error bytes being written into the serial RX. I will look ito enabling the watchdog in mcuboot.

Children
Related