File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ int Arduino_Portenta_OTA::decompress()
137
137
uint32_t crc32, bytes_read;
138
138
uint8_t crc_buf[128 ];
139
139
140
+ feedWatchdog ();
141
+
140
142
/* Read the OTA header ... */
141
143
fread (ota_header.buf , 1 , sizeof (ota_header.buf ), update_file);
142
144
@@ -147,6 +149,8 @@ int Arduino_Portenta_OTA::decompress()
147
149
return static_cast <int >(Error::OtaHeaderLength);
148
150
}
149
151
152
+ feedWatchdog ();
153
+
150
154
/* ... and the CRC second ... rewind to start of CRC verified header ... */
151
155
fseek (update_file, sizeof (ota_header.header .len ) + sizeof (ota_header.header .crc32 ), SEEK_SET);
152
156
/* ... initialize CRC ... */
@@ -161,6 +165,9 @@ int Arduino_Portenta_OTA::decompress()
161
165
}
162
166
fread (crc_buf, 1 , ota_header.header .len - bytes_read, update_file);
163
167
crc32 = crc_update (crc32, crc_buf, ota_header.header .len - bytes_read);
168
+
169
+ feedWatchdog ();
170
+
164
171
/* ... then finalise ... */
165
172
crc32 ^= 0xFFFFFFFF ;
166
173
/* ... and compare. */
@@ -170,6 +177,8 @@ int Arduino_Portenta_OTA::decompress()
170
177
return static_cast <int >(Error::OtaHeaderCrc);
171
178
}
172
179
180
+ feedWatchdog ();
181
+
173
182
if (ota_header.header .magic_number != 0x2341025b ) /* 0x2341:025b = VID/PID Portenta H7 */
174
183
{
175
184
fclose (update_file);
You can’t perform that action at this time.
0 commit comments