Skip to content

Commit feb8a99

Browse files
committed
In eboot for function ets_wdt_enable() added missing arguments
1 parent 9ccd11c commit feb8a99

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

bootloaders/eboot/eboot.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717

1818
#define SWRST do { (*((volatile uint32_t*) 0x60000700)) |= 0x80000000; } while(0);
1919

20-
extern void ets_wdt_enable(void);
20+
/*
21+
After Power Enable Pin, EXT_RST, or HWDT event, at "main()" in eboot, WDT is
22+
disabled. Key WDT hardware registers are zero.
23+
24+
After "ESP.restart()" and other soft restarts, at "main()" in eboot, WDT is enabled.
25+
*/
26+
extern void ets_wdt_enable(uint32_t mode, uint32_t arg1, uint32_t arg2);
2127
extern void ets_wdt_disable(void);
2228

2329
int print_version(const uint32_t flash_addr)
@@ -241,12 +247,12 @@ int main()
241247

242248
ets_wdt_disable();
243249
res = copy_raw(cmd.args[0], cmd.args[1], cmd.args[2], false);
244-
ets_wdt_enable();
250+
ets_wdt_enable(4, 12, 12); // WDT about 13 secs.
245251

246252
ets_printf("%d\n", res);
247253
#if 0
248-
//devyte: this verify step below (cmp:) only works when the end of copy operation above does not overwrite the
249-
//beginning of the image in the empty area, see #7458. Disabling for now.
254+
//devyte: this verify step below (cmp:) only works when the end of copy operation above does not overwrite the
255+
//beginning of the image in the empty area, see #7458. Disabling for now.
250256
//TODO: replace the below verify with hash type, crc, or similar.
251257
// Verify the copy
252258
ets_printf("cmp:");
@@ -257,7 +263,7 @@ int main()
257263
}
258264

259265
ets_printf("%d\n", res);
260-
#endif
266+
#endif
261267
if (res == 0) {
262268
cmd.action = ACTION_LOAD_APP;
263269
cmd.args[0] = cmd.args[1];

bootloaders/eboot/eboot.elf

128 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)