wokwi / avr8js

Arduino (8-bit AVR) simulator, written in JavaScript and runs in the browser / Node.js
https://blog.wokwi.com/avr8js-simulate-arduino-in-javascript/
MIT License
481 stars 78 forks source link

Timer Overflow interrupt fires twice #80

Closed urish closed 3 years ago

urish commented 3 years ago

The scenario is as follows:

This is probably related to the fix for #75. It doesn't always happen - if TCNT overflows without going through the TOP value (e.g. in case of a two-cycle instruction that starts one cycle before TCNT equals TOP), it will function correctly.