Watchdog reset during DFU

Hello,

While working on the DFU, I can't get MCUBoot to complete a slot swap ... The device always is reset due to the watchdog.

The watchdog is setup in the app. I know that once it is started, it can't be stopped; which is shy the bootloader should feed it.

If I don't enable the watchdog in the app, everything works fine.

I already added the following config to mcuboot.conf, but it does not help.

CONFIG_BOOT_WATCHDOG_FEED=y
CONFIG_WATCHDOG=y

Since I wasn't sure of the usage, I also added this to mcuboot_config.h

  #define MCUBOOT_WATCHDOG_FEED()
     do { 
        wdt_feed(wdt, wdt_channel_id);
      } while (0)
 

What am I missing ? Is there a specific setting I need to have when enabling the watchdog. I currently use wdt_install_timeout(),  wdt_setup() and wdt_feed().

Thanks.

Parents Reply
  • Hi,

    I am sorry for the late reply.

    Vincent44 said:

    If I increase the watchdog to 35 sec, I have no problem.

    While increasing the timer is acceptable for my application, I have the feeling that it's just a solution to move around the initial problem

    I agree. The watchdog should be fed in between writing chunks, so ther seems to be an issue here. I need to look into it and get back to you.

    Vincent44 said:
    Is there any specific configuration to have on the watchdog ?

    No, feedign of the watchdog should work out of the box when enabled (it is possible to read all relevant information direclty from the WDT peripheral registers, so configuration is not needed).

Children
Related