From: iceman1001 Date: Fri, 23 Sep 2016 21:23:17 +0000 (+0200) Subject: CHG: lowered the timout again, but re-added the spindelay since 14a requires 5ms... X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/d5bded10e28299e4a2b49aaae7d93457736c1263?hp=93b7aa8f883e27c286bb1becc51783c58aa3b78b CHG: lowered the timout again, but re-added the spindelay since 14a requires 5ms powerup before entering the idle-state where tag starts to listen. CHG: fix the ticks compare xx > 1 into xx >= 1 --- diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 5a43e233..61c018bb 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -2001,6 +2001,8 @@ void iso14443a_setup(uint8_t fpga_minor_mode) { LED_D_ON(); FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_ISO14443A | fpga_minor_mode); + + SpinDelay(20); // Start the timer StartCountSspClk(); @@ -2009,7 +2011,7 @@ void iso14443a_setup(uint8_t fpga_minor_mode) { DemodReset(); UartReset(); NextTransferTime = 2 * DELAY_ARM2AIR_AS_READER; - iso14a_set_timeout(20*106); // 20ms default + iso14a_set_timeout(10*106); // 20ms default } int iso14_apdu(uint8_t *cmd, uint16_t cmd_len, void *data) { diff --git a/armsrc/ticks.c b/armsrc/ticks.c index 6f34fe14..d183c707 100644 --- a/armsrc/ticks.c +++ b/armsrc/ticks.c @@ -211,5 +211,5 @@ void ResetTicks(){ } void ResetTimer(AT91PS_TC timer){ timer->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG; - while(timer->TC_CV > 1) ; + while(timer->TC_CV >= 1) ; }