I've been trying to enable the watchdog as early as possible during boot. I haven't been able to find any way to configure the nrf52832 watchdog to enable itself prior to code execution (nothing in the nrf52832 manual indicates this is possible).
My next step was to try to enable it as early as possible in the bootloader (mcuboot).
Mcuboot has KConfig CONFIG_BOOT_WATCHDOG_FEED which i've enabled, however mcuboot doesn't provide any option to enable the watchdog. I assume this must be done via zephyr instead. I've seen some zephyr drivers support enabling the watchdog at the end of the watchdog driver initialisation, but wdt_nrfx.c doesn't appear to support this.
Instead I thought i'd try adding a source file into the mcuboot build which uses SYS_INIT to configure the watchdog in PRE_KERNEL_2 (wdt_nrfx is initialised in PRE_KERNEL_1). However I can't figure out how to get this source file into the mcuboot build without modifying the CMakelists.txt in the mcuboot repository (I don't want to maintain my own fork of mcuboot).
How can I enable the watchdog as soon as possible in mcuboot, have mcuboot feed it, then once the application jump happens, feed from the application (I know how to feed from application normally, but zephyrs feeding api requires a watchdog_channel, which even if I did have it in mcuboot, won't be available to the application).