xfdump_full_dump_and_reset: set a guaranteed minimum WDT
Just prior to dumping, reset the WDT to a known-safe (and not too long) interval that guarantees a complete dump.
This commit is contained in:
parent
3f7b9b42b2
commit
0362b6484f
@ -105,10 +105,14 @@ void xfdump_full_dump_and_reset(dump_crash_source crash)
|
||||
// disable interrupts for a cleaner register dump
|
||||
cli();
|
||||
|
||||
// ensure there's always enough time (with some margin) to dump
|
||||
// dump time on w25x20cl: ~150ms
|
||||
wdt_enable(WDTO_500MS);
|
||||
|
||||
// write all addressable ranges (this will trash bidirectional registers)
|
||||
xfdump_dump_core(buf, DUMP_OFFSET + offsetof(dump_t, data), 0, RAMEND);
|
||||
|
||||
// force a reset soon
|
||||
// force a reset even sooner
|
||||
softReset();
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user