1# Copyright (c) 2023 Nordic Semiconductor ASA
2#
3# SPDX-License-Identifier: Apache-2.0
4
5if BOOT_FIRMWARE_LOADER
6
7menu "Firmware loader entrance methods"
8
9menuconfig BOOT_FIRMWARE_LOADER_ENTRANCE_GPIO
10	bool "GPIO"
11	depends on GPIO
12	help
13	  Use a GPIO to enter firmware loader mode.
14
15config BOOT_FIRMWARE_LOADER_DETECT_DELAY
16	int "Serial detect pin detection delay time [ms]"
17	default 0
18	depends on BOOT_FIRMWARE_LOADER_ENTRANCE_GPIO
19	help
20	  Used to prevent the bootloader from loading on button press.
21	  Useful for powering on when using the same button as
22	  the one used to place the device in bootloader mode.
23
24config BOOT_FIRMWARE_LOADER_BOOT_MODE
25	bool "Check boot mode via retention subsystem"
26	depends on RETENTION_BOOT_MODE
27	help
28	  Allows for entering firmware loader mode by using Zephyr's boot mode
29	  retention system (i.e. an application must set the boot mode to stay
30	  in firmware loader mode and reboot the module).
31
32config BOOT_FIRMWARE_LOADER_NO_APPLICATION
33	bool "Stay in bootloader if no application"
34	help
35	  Allows for entering firmware loader mode if there is no bootable
36	  application that the bootloader can jump to.
37
38config BOOT_FIRMWARE_LOADER_PIN_RESET
39	bool "Check for device reset by pin"
40	select HWINFO
41	help
42	  Checks if the module reset was caused by the reset pin and will
43	  remain in bootloader firmware loader mode if it was.
44
45endmenu
46
47endif
48