simulavr icon indicating copy to clipboard operation
simulavr copied to clipboard

Lots of interrupt losses since this upstream commit regarding interrupt handling

Open Traumflug opened this issue 8 years ago • 3 comments

With this upstream patch applied I experience lots of interrupt losses (time 1A going full round instead of interrupting in time) with code which is known to work fine on a real controller. Code is Teacup, a 3D printer controller firmware, and pretty complex. More precisely the code in timer-avr.c, but there are other interrupts running continuously.

Now I'm wondering how I can simplify this complex firmware into a demonstration case which can be measured on the scope. I have no logic analyser, so "long time" measurements are limited to some 20'000 samples.

Traumflug avatar Sep 18 '15 08:09 Traumflug

Nice thing is, the original patch doesn't show this misbehaviour, running Teacup Firmware brings pretty much the same results as without the patch:

Unpatched: unpatched

With @mhx patch: mhx patch

With upstream patch: savannah patch

All runs with the very same firmware binary, only SimulAVR was recompiled for each run.

Bug also reported upstream: https://savannah.nongnu.org/bugs/?45994

Traumflug avatar Sep 18 '15 10:09 Traumflug

The obvious course of action is to remove the upstream patch and apply the @mhx one, which is what I did for branch traumflug. This branch is now fine again.

Keeping the issue open to inform about upstream.

Traumflug avatar Sep 18 '15 11:09 Traumflug

Yay! :)

mhx avatar Sep 21 '15 11:09 mhx