projects
/
sx
/
simavr.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
regExp
home
|
summary
|
tags
|
heads
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
raw
|
patch
| inline |
side by side
(parent:
1b6e6ed
)
Commit
981994757450073ec8043105dedcf9b00d46f45b
author
Mike Playle
<mike@mythik.co.uk>
Thu, 1 Feb 2018 22:12:02 +0000
(22:12 +0000)
committer
Mike Playle
<mike@mythik.co.uk>
Thu, 1 Feb 2018 22:30:38 +0000
(22:30 +0000)
simavr/sim/avr_timer.c
patch
|
blob
|
history
|
download
diff --git
a/simavr/sim/avr_timer.c
b/simavr/sim/avr_timer.c
index 6be4a2931cb8fb0ab648ed8a7108ca03a761b997..2eb2009ea0b8e9262fcd97edef688fb6416b1dc3 100644
(file)
--- a/
simavr/sim/avr_timer.c
+++ b/
simavr/sim/avr_timer.c
@@
-120,6
+120,11
@@
avr_timer_comp_on_tov(
uint8_t mode = avr_regbit_get(avr, p->comp[comp].com);
avr_irq_t * irq = &p->io.irq[TIMER_IRQ_OUT_COMP + comp];
+ // only PWM modes have special behaviour on overflow
+ if((p->wgm_op_mode_kind != avr_timer_wgm_pwm) &&
+ (p->wgm_op_mode_kind != avr_timer_wgm_fast_pwm))
+ return;
+
switch (mode) {
case avr_timer_com_normal: // Normal mode
break;