Improved watchdog and flash

This commit is contained in:
Heintz 2019-09-30 13:36:12 +02:00
parent dbd7fe1374
commit a7cbb6d64f
2 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,6 @@ public class Flash extends IOUnit {
super("Flash", "Internal Flash", cpu, memory, offset);
this.main_range = main_range;
this.info_range = info_range;
locked = true;
Arrays.fill(memory, main_range.start, main_range.end, 0xff);
Arrays.fill(memory, info_range.start, info_range.end, 0xff);

View File

@ -112,6 +112,8 @@ public class Watchdog extends IOUnit implements SFRModule {
public void reset(int type) {
super.reset(type);
wdtctl = 0x4;
delay=DELAY[wdtctl & WDTISx];
scheduleTimer();
}
private void triggerWDT(long time) {