From 1809c309a7cbc2025161e805009d19d702749d2e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 23 Oct 2020 14:23:52 +0200 Subject: sync=timer: fix end of measurement offset error --- lib/harness.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/harness.py b/lib/harness.py index 3074d25..92fb9b4 100644 --- a/lib/harness.py +++ b/lib/harness.py @@ -421,21 +421,19 @@ class OnboardTimerHarness(TransitionHarness): # TODO Make nicer ret += """\nvoid runLASync(){ // ======================= LED SYNC ================================ - ptalog.passTransition(0); - ptalog.startTransition(); - gpio.led_toggle(0); - gpio.led_toggle(1); - ptalog.stopTransition(); + gpio.write(PTALOG_GPIO, 1); + gpio.led_on(0); + gpio.led_on(1); + gpio.write(PTALOG_GPIO, 0); for (unsigned char i = 0; i < 4; i++) { arch.sleep_ms(250); } - ptalog.passTransition(0); - ptalog.startTransition(); - gpio.led_toggle(0); - gpio.led_toggle(1); - ptalog.stopTransition(); + gpio.write(PTALOG_GPIO, 1); + gpio.led_off(0); + gpio.led_off(1); + gpio.write(PTALOG_GPIO, 0); // ======================= LED SYNC ================================ }\n\n""" return ret @@ -452,9 +450,11 @@ class OnboardTimerHarness(TransitionHarness): def stop_benchmark(self): ret = "" - ret += super().stop_benchmark() if self.energytrace_sync == "led": + ret += "counter.stop();\n" ret += "runLASync();\n" + ret += super().stop_benchmark() + if self.energytrace_sync == "led": ret += "arch.sleep_ms(250);\n" return ret -- cgit v1.2.3