|
| 1 | +.. _entering_dfu_single_bank: |
| 2 | + |
| 3 | +Entering Single-Bank Device Firmware Update (DFU) mode |
| 4 | +###################################################### |
| 5 | + |
| 6 | +|BMlong| supports a single-bank DFU mechanism. The device normally executes the application which can't update itself nor firmware elements it's depends on. |
| 7 | +This mean that the device running the application must be switched to the DFU mode so it will run the firmware loader. |
| 8 | +The firmware loader is the physically separated firmware entity, which provides services for supporting the firmware download to the single Bank. |
| 9 | +Decision on entering the firmware loader is made by the MCUboot. |
| 10 | +The available entering schemes are listed bellow: |
| 11 | + |
| 12 | +Entering on GPIO state |
| 13 | +********************** |
| 14 | + |
| 15 | +Firmware loader will be entered when the active state of a GPIO pin will be asserted during early device startup. |
| 16 | +The SoC must be rebooted, for instance by the board power toggling for performing this action. |
| 17 | +Use the :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_FIRMWARE_LOADER_ENTRANCE_GPIO` sysbuild Kconfig option to use this mode. |
| 18 | +The GPIO PIN is configured by the definition of `BOARD_PIN_BTN_0` of the board in its :file:`include/board-config.h` file. |
| 19 | + |
| 20 | +Entering on reset by PIN |
| 21 | +************************ |
| 22 | + |
| 23 | +Firmware loader will be entered when the SoC reset will be triggered by the reset pin. |
| 24 | +Use the :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_FIRMWARE_LOADER_ENTRANCE_PIN_RESET` sysbuild Kconfig option to use this mode. |
| 25 | + |
| 26 | +Buttonless entering |
| 27 | +******************* |
| 28 | + |
| 29 | +Firmware loader will be entered when the MCUboot detects such request delivered to the retained memory area by the application. |
| 30 | +The application must triggered the SoC reset for making MCUboot to performing this action. |
| 31 | +Use boot mode API: :c:func:`bootmode_set` and :c:enum:`BOOT_MODE_TYPE_BOOTLOADER` to set the retention boot mode value. |
| 32 | +Use the :kconfig:option:`SB_CONFIG_BM_BOOTLOADER_MCUBOOT_FIRMWARE_LOADER_ENTRANCE_BOOT_MODE` sysbuild Kconfig option to use this mode. |
| 33 | + |
| 34 | +The SoC's GPREGRET1 register is used as the retained memory area for that purpose. The board DTS must describe this register and it assignment to the :devicetree:`chosen/zephyr,boot-mode` chosen property. |
| 35 | + |
| 36 | +This mode is integrated with the MCUmgr OS reset command when the :kconfig:option:`CONFIG_MCUMGR_GRP_OS_RESET_BOOT_MODE` Kconfig option is enabled. |
0 commit comments