From fef4b742c989e0f83c4f78a537ef21fc8db4bd35 Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Tue, 18 Dec 2018 15:11:30 +0100 Subject: [PATCH] fix jitter yeah...don't rjmp into interrupt instead of main loop m( --- foo.S | 2 -- 1 file changed, 2 deletions(-) diff --git a/foo.S b/foo.S index 054a32b..566d9fc 100644 --- a/foo.S +++ b/foo.S @@ -271,7 +271,6 @@ main: ; setup routine SEI #undef one #undef zero - RJMP sample loop: SLEEP ; wait for interrupt @@ -280,7 +279,6 @@ loop: sample: ; potential TODO: softcounter in r25 to only update duty cicle every n iterations ; potential TODO: save/restore status register (SREG=0x3f) (only if something in mainloop) - ; TODO: there is substantial jitter in the tim0_ovf interval -- are we clearing the interrupt flag correctly? OUT OCR0AL, acc ; start by outputting a sample, because routine has variable runtime SBI PORTB, 2 ; to measure runtime -- 2.39.3