mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-24 06:55:27 -07:00
Added timing analysis based on how long it takes to receive all bytes.
This commit is contained in:
parent
5bbb503192
commit
7a5acc71ac
2 changed files with 6 additions and 1 deletions
|
@ -2015,6 +2015,7 @@ void ReaderIso14443a(UsbCommand *c)
|
||||||
byte_t buf[USB_CMD_DATA_SIZE] = {0};
|
byte_t buf[USB_CMD_DATA_SIZE] = {0};
|
||||||
uint8_t par[MAX_PARITY_SIZE];
|
uint8_t par[MAX_PARITY_SIZE];
|
||||||
bool cantSELECT = false;
|
bool cantSELECT = false;
|
||||||
|
uint32_t start_ts = 0, end_ts = 0;
|
||||||
|
|
||||||
set_tracing(true);
|
set_tracing(true);
|
||||||
|
|
||||||
|
@ -2091,7 +2092,11 @@ void ReaderIso14443a(UsbCommand *c)
|
||||||
ReaderTransmit(cmd,len, NULL); // 8 bits, odd parity
|
ReaderTransmit(cmd,len, NULL); // 8 bits, odd parity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
start_ts = GetCountSspClk(); //started just after we send all our bytes to the PICC
|
||||||
arg0 = ReaderReceive(buf, par);
|
arg0 = ReaderReceive(buf, par);
|
||||||
|
end_ts = GetCountSspClk(); //ended just after we have received all the response bytes from the PICC.
|
||||||
|
uint32_t cycles_taken = end_ts - start_ts;
|
||||||
|
Dbprintf("Cycles taken to receive response from sending those bytes = %d", cycles_taken);
|
||||||
|
|
||||||
LED_B_ON();
|
LED_B_ON();
|
||||||
cmd_send(CMD_ACK,arg0,0,0,buf,sizeof(buf));
|
cmd_send(CMD_ACK,arg0,0,0,buf,sizeof(buf));
|
||||||
|
|
|
@ -20,7 +20,7 @@ OBJDIR = obj
|
||||||
LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm
|
LDLIBS = -L/opt/local/lib -L/usr/local/lib -lreadline -lpthread -lm
|
||||||
LUALIB = ../liblua/liblua.a
|
LUALIB = ../liblua/liblua.a
|
||||||
LDFLAGS = $(ENV_LDFLAGS)
|
LDFLAGS = $(ENV_LDFLAGS)
|
||||||
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../common/polarssl -I../zlib -I../uart -I/opt/local/include -I../liblua -Wall -g -O3
|
CFLAGS = $(ENV_CFLAGS) -std=c99 -D_ISOC99_SOURCE -I. -I../include -I../common -I../common/polarssl -I../zlib -I../uart -I/opt/local/include -I../liblua -Wall -g -O3 -Wa,-q,-mavx512f
|
||||||
CXXFLAGS = -I../include -Wall -O3
|
CXXFLAGS = -I../include -Wall -O3
|
||||||
|
|
||||||
LUAPLATFORM = generic
|
LUAPLATFORM = generic
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue