Commit 4ca2d1ac5b2b74a4e68274fba8b03005d22e9d8f
authorKonstantin Begun <kostic2000@gmail.com>
Thu, 23 Feb 2017 01:02:06 +0000 (01:02 +0000)
committerKonstantin Begun <kostic2000@gmail.com>
Thu, 23 Feb 2017 01:02:06 +0000 (01:02 +0000)
simavr/sim/avr_timer.c

index a1c2b4f96ef771394a66d3ca2d07c4f80dd260b5..81131a1a83698fc93d62e64d81c8bc11d9a66d15 100644 (file)
@@ -662,6 +662,7 @@ avr_timer_write(
        if (new_cs != cs || new_mode != mode || new_as2 != as2) {
        /* cs */
                if (new_cs == 0) {
+                       p->cs_div_value = 0;            // reset prescaler
                        // cancel everything
                        avr_timer_cancel_all_cycle_timers(avr, p, 1);