]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/lfops.c
EM410x bug fix
[proxmark3-svn] / armsrc / lfops.c
index 94cfafdf73aa03229bd239c8cfb870156cefcd65..3042b80a7684a1a4f946cdaa9fa40e146d5244bf 100644 (file)
@@ -896,6 +896,7 @@ void CmdEM410xdemod(int findone, int *high, int *low, int ledcontrol)
             //Dbprintf("DEBUG: No Tag");
         }
         WDT_HIT();
+        hi = 0;
         lo = 0;
         clk=0;
         invert=0;
@@ -1054,15 +1055,11 @@ void T55xxWriteBit(int bit)
 // Write one card block in page 0, no lock
 void T55xxWriteBlock(uint32_t Data, uint32_t Block, uint32_t Pwd, uint8_t PwdMode)
 {
-    uint32_t i;
-
-    FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
-    FpgaSendCommand(FPGA_CMD_SET_DIVISOR, 95); //125Khz
-    FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC | FPGA_LF_ADC_READER_FIELD);
+    uint32_t i = 0;
 
-    // Give it a bit of time for the resonant antenna to settle.
-    // And for the tag to fully power up
-    //SpinDelay(150);
+    // Set up FPGA, 125kHz
+    // Wait for config.. (192+8190xPOW)x8 == 67ms
+    LFSetupFPGAForADC(0, true);
 
     // Now start writting
     FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
Impressum, Datenschutz