Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions boot/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ config BOOT_USB_DFU_DETECT_PIN
default 13 if BOARD_NRF52DK_NRF52832
default 23 if BOARD_NRF5340_DK_NRF5340_CPUAPP || BOARD_NRF5340_DK_NRF5340_CPUAPP_NS
default 43 if BOARD_BL5340_DVK_CPUAPP || BOARD_BL5340_DVK_CPUAPP_NS
default -1
help
Pin on the DFU detect port that triggers DFU mode.

Expand Down
1 change: 1 addition & 0 deletions boot/zephyr/Kconfig.serial_recovery
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ config BOOT_SERIAL_DETECT_PIN
default 13 if BOARD_NRF52DK_NRF52832 || BOARD_NRF52833DK_NRF52833
default 23 if BOARD_NRF5340PDK_NRF5340_CPUAPP || BOARD_NRF5340PDK_NRF5340_CPUAPP_NS || \
BOARD_NRF5340DK_NRF5340_CPUAPP || BOARD_NRF5340DK_NRF5340_CPUAPP_NS
default -1
help
Pin on the serial detect port that triggers serial recovery mode.

Expand Down
3 changes: 0 additions & 3 deletions boot/zephyr/boards/actinius_icarus.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ CONFIG_BOOT_MAX_IMG_SECTORS=256

# MCUboot serial recovery
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_DETECT_PORT="GPIO_0"
CONFIG_BOOT_SERIAL_DETECT_PIN=5
CONFIG_BOOT_SERIAL_DETECT_PIN_VAL=0
3 changes: 0 additions & 3 deletions boot/zephyr/boards/circuitdojo_feather_nrf9160.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ CONFIG_BOOT_MAX_IMG_SECTORS=256

# MCUboot serial recovery
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_DETECT_PORT="GPIO_0"
CONFIG_BOOT_SERIAL_DETECT_PIN=12
CONFIG_BOOT_SERIAL_DETECT_PIN_VAL=0
CONFIG_BOOT_SERIAL_DETECT_DELAY=450
CONFIG_MCUBOOT_INDICATION_LED=y

Expand Down
2 changes: 0 additions & 2 deletions boot/zephyr/boards/nrf52840dongle_nrf52840.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ CONFIG_UART_LINE_CTRL=y
CONFIG_GPIO=y
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_CDC_ACM=y
CONFIG_BOOT_SERIAL_DETECT_PORT="GPIO_1"
CONFIG_BOOT_SERIAL_DETECT_PIN=6

# Required by USB
CONFIG_MULTITHREADING=y
Expand Down
3 changes: 0 additions & 3 deletions boot/zephyr/boards/sparkfun_thing_plus_nrf9160.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ CONFIG_BOOT_MAX_IMG_SECTORS=256

# MCUboot serial recovery
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_DETECT_PORT="GPIO_0"
CONFIG_BOOT_SERIAL_DETECT_PIN=12
CONFIG_BOOT_SERIAL_DETECT_PIN_VAL=0
CONFIG_BOOT_SERIAL_DETECT_DELAY=450
CONFIG_MCUBOOT_INDICATION_LED=y

Expand Down
2 changes: 0 additions & 2 deletions boot/zephyr/boards/thingy53_nrf5340_cpuapp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ CONFIG_GPIO=y
CONFIG_MCUBOOT_SERIAL=y
CONFIG_MCUBOOT_SERIAL_DIRECT_IMAGE_UPLOAD=y
CONFIG_BOOT_SERIAL_CDC_ACM=y
CONFIG_BOOT_SERIAL_DETECT_PORT="GPIO_1"
CONFIG_BOOT_SERIAL_DETECT_PIN=13

# Required by QSPI
CONFIG_NORDIC_QSPI_NOR=y
Expand Down
6 changes: 6 additions & 0 deletions boot/zephyr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ static const struct gpio_dt_spec button0 = GPIO_DT_SPEC_GET(BUTTON_0_NODE, gpios

#if defined(CONFIG_MCUBOOT_SERIAL)

/* The value of -1 is used by default. It must be properly specified for a board before used. */
BUILD_ASSERT(CONFIG_BOOT_SERIAL_DETECT_PIN != -1);

#define BUTTON_0_GPIO_LABEL CONFIG_BOOT_SERIAL_DETECT_PORT
#define BUTTON_0_GPIO_PIN CONFIG_BOOT_SERIAL_DETECT_PIN
#define BUTTON_0_GPIO_FLAGS ((CONFIG_BOOT_SERIAL_DETECT_PIN_VAL) ?\
Expand All @@ -397,6 +400,9 @@ static const struct gpio_dt_spec button0 = GPIO_DT_SPEC_GET(BUTTON_0_NODE, gpios

#elif defined(CONFIG_BOOT_USB_DFU_GPIO)

/* The value of -1 is used by default. It must be properly specified for a board before used. */
BUILD_ASSERT(CONFIG_BOOT_USB_DFU_DETECT_PIN != -1);

#define BUTTON_0_GPIO_LABEL CONFIG_BOOT_USB_DFU_DETECT_PORT
#define BUTTON_0_GPIO_PIN CONFIG_BOOT_USB_DFU_DETECT_PIN
#define BUTTON_0_GPIO_FLAGS ((CONFIG_BOOT_USB_DFU_DETECT_PIN_VAL) ?\
Expand Down