projects
/
proxmark3-svn
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c3fc86d
)
CHG: TI code did have the tickstimer started.
author
iceman1001
<iceman@iuse.se>
Wed, 19 Oct 2016 19:24:20 +0000
(21:24 +0200)
committer
iceman1001
<iceman@iuse.se>
Wed, 19 Oct 2016 19:24:20 +0000
(21:24 +0200)
armsrc/lfops.c
patch
|
blob
|
blame
|
history
diff --git
a/armsrc/lfops.c
b/armsrc/lfops.c
index 642b193775a52e42f2f33657ce9adbdf75aa8be2..5931c76af9554010cdac19df4b6cea333edeae9c 100644
(file)
--- a/
armsrc/lfops.c
+++ b/
armsrc/lfops.c
@@
-91,6
+91,7
@@
void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint32_t periods, uint3
*/
void ReadTItag(void)
{
*/
void ReadTItag(void)
{
+ StartTicks();
// some hardcoded initial params
// when we read a TI tag we sample the zerocross line at 2Mhz
// TI tags modulate a 1 as 16 cycles of 123.2Khz
// some hardcoded initial params
// when we read a TI tag we sample the zerocross line at 2Mhz
// TI tags modulate a 1 as 16 cycles of 123.2Khz
@@
-216,6
+217,7
@@
void ReadTItag(void)
DbpString("Info: CRC is good");
}
}
DbpString("Info: CRC is good");
}
}
+ StopTicks();
}
void WriteTIbyte(uint8_t b)
}
void WriteTIbyte(uint8_t b)
@@
-282,7
+284,7
@@
void AcquireTiType(void)
HIGH(GPIO_SSC_DOUT);
// Charge TI tag for 50ms.
HIGH(GPIO_SSC_DOUT);
// Charge TI tag for 50ms.
-
SpinDelay
(50);
+
WaitMS
(50);
// stop modulating antenna and listen
LOW(GPIO_SSC_DOUT);
// stop modulating antenna and listen
LOW(GPIO_SSC_DOUT);
@@
-322,6
+324,7
@@
void AcquireTiType(void)
// if not provided a valid crc will be computed from the data and written.
void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
{
// if not provided a valid crc will be computed from the data and written.
void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
{
+ StartTicks();
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
if(crc == 0) {
crc = update_crc16(crc, (idlo)&0xff);
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
if(crc == 0) {
crc = update_crc16(crc, (idlo)&0xff);
@@
-360,7
+363,7
@@
void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
// modulate antenna
HIGH(GPIO_SSC_DOUT);
// modulate antenna
HIGH(GPIO_SSC_DOUT);
-
SpinDelay(50);
// charge time
+
WaitMS(50);
// charge time
WriteTIbyte(0xbb); // keyword
WriteTIbyte(0xeb); // password
WriteTIbyte(0xbb); // keyword
WriteTIbyte(0xeb); // password
@@
-377,7
+380,7
@@
void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
WriteTIbyte(0x00); // write frame lo
WriteTIbyte(0x03); // write frame hi
HIGH(GPIO_SSC_DOUT);
WriteTIbyte(0x00); // write frame lo
WriteTIbyte(0x03); // write frame hi
HIGH(GPIO_SSC_DOUT);
-
SpinDelay(50);
// programming time
+
WaitMS(50);
// programming time
LED_A_OFF();
LED_A_OFF();
@@
-386,6
+389,7
@@
void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
DbpString("Now use `lf ti read` to check");
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
DbpString("Now use `lf ti read` to check");
+ StopTicks();
}
void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
}
void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
@@
-443,6
+447,7
@@
void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
}
}
}
}
}
}
+ StopTicks();
}
#define DEBUG_FRAME_CONTENTS 1
}
#define DEBUG_FRAME_CONTENTS 1
Impressum
,
Datenschutz