aboutsummaryrefslogtreecommitdiff
path: root/src/peripherals/timer.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/peripherals/timer.ts')
-rw-r--r--src/peripherals/timer.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/peripherals/timer.ts b/src/peripherals/timer.ts
index c6bf742..315d725 100644
--- a/src/peripherals/timer.ts
+++ b/src/peripherals/timer.ts
@@ -247,6 +247,7 @@ export class AVRTimer {
this.cpu.writeHooks[config.TCNT] = (value: u8) => {
this.tcnt = (this.highByteTemp << 8) | value;
+ this.countingUp = true;
this.tcntUpdated = true;
this.timerUpdated();
};
@@ -281,6 +282,7 @@ export class AVRTimer {
};
cpu.writeHooks[config.TCCRB] = (value) => {
this.cpu.data[config.TCCRB] = value;
+ this.tcntUpdated = true;
this.updateWGMConfig();
return true;
};