Skip to content

Wdog trigger during binary download decompressio for portenta #261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ArduinoIoTCloudTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# include <algorithm>
# include "tls/utility/SHA256.h"
# include <stm32h7xx_hal_rtc_ex.h>
# include <WiFi.h>
#endif

#include "utility/ota/OTA.h"
Expand Down Expand Up @@ -285,11 +286,10 @@ int ArduinoIoTCloudTCP::begin(bool const enable_watchdog, String brokerAddress,
#if defined (ARDUINO_ARCH_SAMD) || defined (ARDUINO_ARCH_MBED)
if (enable_watchdog) {
watchdog_enable();
#ifdef WIFI_HAS_FEED_WATCHDOG_FUNC
#if defined (WIFI_HAS_FEED_WATCHDOG_FUNC) || defined (ARDUINO_PORTENTA_H7_WIFI_HAS_FEED_WATCHDOG_FUNC)
WiFi.setFeedWatchdogFunc(watchdog_reset);
#endif
}

#endif

return 1;
Expand Down
4 changes: 4 additions & 0 deletions src/utility/ota/OTA-portenta-h7.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ int portenta_h7_onOTARequest(char const * ota_url)
/* Use 2nd partition of QSPI (1st partition contains WiFi firmware) */
Arduino_Portenta_OTA_QSPI ota_portenta_qspi(QSPI_FLASH_FATFS_MBR, 2);

#if defined (ARDUINO_PORTENTA_OTA_HAS_WATCHDOG_FEED)
ota_portenta_qspi.setFeedWatchdogFunc(watchdog_reset);
#endif

watchdog_reset();

/* Initialize the QSPI memory for OTA handling. */
Expand Down