OTA on Portenta Machine Control with Watchdog

Hello,

I'm using a Portenta Machine Control with the Arduino_Portenta_OTA library. This works fine unless it's used with the MBed Watchdog timer which will timeout during the decompression process for any reasonably sized binary even at the maximum timeout value. As far as I can tell, stopping the watchdog on Portenta is not possible.

Has anyone else found a way to do OTA updates while also using a watchdog timer?

1 Like

Hello @econeale,
I had the same issue today. I found that you can pass the watchdog.kick() function to the ota object. Then it will call the watchdog.kick() while updating.

Before setup():
mbed::Watchdog &watchdog = mbed::Watchdog::get_instance();

In setup():
watchdog.start();

In loop():
watchdog.kick();

In the update function:
ArduinoPortentaOtaWatchdogResetFuncPointer watchdog_reset = []() {
  watchdog.kick();
};
  ota.setFeedWatchdogFunc(watchdog_reset);

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.