]> cvs.zerfleddert.de Git - proxmark3-svn/commitdiff
re-add piwi's trace memory fixes
authormarshmellow42 <marshmellowrf@gmail.com>
Tue, 30 Jun 2015 17:00:51 +0000 (13:00 -0400)
committermarshmellow42 <marshmellowrf@gmail.com>
Tue, 30 Jun 2015 17:00:51 +0000 (13:00 -0400)
armsrc/iso14443b.c

index 7a0fc8e02f1a3cdf1063510380e4ea9c93ae28a7..10b9e953d592b9d4514a443a6856d78a4f284e2f 100644 (file)
@@ -334,6 +334,8 @@ void SimulateIso14443bTag(void)
                0x00, 0x21, 0x85, 0x5e, 0xd7
        };
 
+       FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
+
        clear_trace();
        set_tracing(TRUE);
 
@@ -348,8 +350,6 @@ void SimulateIso14443bTag(void)
        uint16_t len;
        uint16_t cmdsRecvd = 0;
 
-       FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
-
        // prepare the (only one) tag answer:
        CodeIso14443bAsTag(response1, sizeof(response1));
        uint8_t *resp1Code = BigBuf_malloc(ToSendMax);
@@ -908,9 +908,6 @@ static void CodeAndTransmit14443bAsReader(const uint8_t *cmd, int len)
 //-----------------------------------------------------------------------------
 void ReadSTMemoryIso14443b(uint32_t dwLast)
 {
-       clear_trace();
-       set_tracing(TRUE);
-
        uint8_t i = 0x00;
 
        FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
@@ -929,6 +926,9 @@ void ReadSTMemoryIso14443b(uint32_t dwLast)
        FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_READER_RX_XCORR | FPGA_HF_READER_RX_XCORR_848_KHZ);
        SpinDelay(200);
 
+       clear_trace();
+       set_tracing(TRUE);
+
        // First command: wake up the tag using the INITIATE command
        uint8_t cmd1[] = {0x06, 0x00, 0x97, 0x5b};
        CodeAndTransmit14443bAsReader(cmd1, sizeof(cmd1));
@@ -1199,7 +1199,7 @@ void SendRawCommand14443B(uint32_t datalen, uint32_t recv, uint8_t powerfield, u
        FpgaDownloadAndGo(FPGA_BITSTREAM_HF);
        SetAdcMuxFor(GPIO_MUXSEL_HIPKD);
        FpgaSetupSsc();
-       
+
        if (datalen){
                set_tracing(TRUE);
                
Impressum, Datenschutz