File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -495,6 +495,16 @@ config MCUBOOT_HW_DOWNGRADE_PREVENTION
495495
496496endchoice
497497
498+ config BOOT_WATCHDOG_FEED
499+ bool "Feed the watchdog while doing swap"
500+ default y if SOC_FAMILY_NRF
501+ imply NRFX_WDT
502+ imply NRFX_WDT0
503+ imply NRFX_WDT1
504+ help
505+ Enables implementation of MCUBOOT_WATCHDOG_FEED() macro which is
506+ used to feed watchdog while doing time consuming operations.
507+
498508endmenu
499509
500510config MCUBOOT_DEVICE_SETTINGS
Original file line number Diff line number Diff line change 154154
155155#endif /* !__BOOTSIM__ */
156156
157+ #if CONFIG_BOOT_WATCHDOG_FEED
157158#if CONFIG_NRFX_WDT
158159#include <nrfx_wdt.h>
159160
180181#endif /* defined(CONFIG_NRFX_WDT0) && defined(CONFIG_NRFX_WDT1) */
181182
182183#else /* CONFIG_NRFX_WDT */
183-
184+ #warning "MCUBOOT_WATCHDOG_FEED() is no-op"
185+ /* No vendor implementation, no-op for historical reasons */
184186#define MCUBOOT_WATCHDOG_FEED () \
185187 do { \
186- /* TODO: to be implemented */ \
187188 } while (0)
188-
189189#endif /* CONFIG_NRFX_WDT */
190+ #else /* CONFIG_BOOT_WATCHDOG_FEED */
191+ /* Not enabled, no feed activity */
192+ #define MCUBOOT_WATCHDOG_FEED () \
193+ do { \
194+ } while (0)
195+
196+ #endif /* CONFIG_BOOT_WATCHDOG_FEED */
190197
191198#endif /* __MCUBOOT_CONFIG_H__ */
You can’t perform that action at this time.
0 commit comments