From c1b1d45155ba666d43d4d26b997b45eef8ff50f8 Mon Sep 17 00:00:00 2001 From: Richard Eoin Meadows Date: Wed, 28 May 2014 12:45:21 +0100 Subject: [PATCH] TRST only exists on hardware version 0 --- src/platforms/stm32/jtagtap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/platforms/stm32/jtagtap.c b/src/platforms/stm32/jtagtap.c index 78dd300..2d09b84 100644 --- a/src/platforms/stm32/jtagtap.c +++ b/src/platforms/stm32/jtagtap.c @@ -42,10 +42,12 @@ int jtagtap_init(void) void jtagtap_reset(void) { #ifdef TRST_PORT - volatile int i; - gpio_clear(TRST_PORT, TRST_PIN); - for(i = 0; i < 10000; i++) asm("nop"); - gpio_set(TRST_PORT, TRST_PIN); + if (platform_hwversion() == 0) { + volatile int i; + gpio_clear(TRST_PORT, TRST_PIN); + for(i = 0; i < 10000; i++) asm("nop"); + gpio_set(TRST_PORT, TRST_PIN); + } #endif jtagtap_soft_reset(); }