From 6646c20ef33557f5148acd333efee54541996063 Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 4 Jul 2019 11:21:45 +0100 Subject: [PATCH] Fix clock deadlock in hitag sniff --- armsrc/hitag2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/armsrc/hitag2.c b/armsrc/hitag2.c index 2a7cf2859..2382be273 100644 --- a/armsrc/hitag2.c +++ b/armsrc/hitag2.c @@ -739,7 +739,7 @@ void SniffHitag(void) { AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG; // synchronized startup procedure - while (AT91C_BASE_TC0->TC_CV > 0) {}; // wait until TC0 returned to zero + while (AT91C_BASE_TC1->TC_CV > 0) {}; // wait until TC1 returned to zero // Reset the received frame, frame count and timing info memset(rx, 0x00, sizeof(rx)); @@ -887,7 +887,6 @@ void SniffHitag(void) { set_tracing(false); AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKDIS; - AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKDIS; // release allocated memory from BigBuff. BigBuf_free();