From 84ffdd3b2170da8507c489987230c6fc9d4e2fe4 Mon Sep 17 00:00:00 2001 From: ylm Date: Fri, 29 Jul 2022 21:30:57 -0400 Subject: [PATCH] fix: Add nop instruction for timing purpose Adding a nop instruction in the no_delay TMS sequence routine fixes timing on the f4discovery platform --- src/platforms/common/jtagtap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platforms/common/jtagtap.c b/src/platforms/common/jtagtap.c index 7119e38..12d41c2 100644 --- a/src/platforms/common/jtagtap.c +++ b/src/platforms/common/jtagtap.c @@ -108,6 +108,7 @@ static void jtagtap_tms_seq_no_delay(uint32_t tms_states, size_t ticks) gpio_set_val(TMS_PORT, TMS_PIN, state); gpio_set(TCK_PORT, TCK_PIN); tms_states >>= 1; + __asm__("nop"); ticks--; gpio_clear(TCK_PORT, TCK_PIN); }