FIX: longer t55xx timings to compensate for delay of field damping, and minor adjustments.

This commit is contained in:
Chris 2018-09-04 20:35:29 +02:00
commit ac6bd61544

View file

@ -27,10 +27,10 @@
#endif #endif
#define START_GAP 31*8 // was 250 // SPEC: 1*8 to 50*8 - typ 15*8 (15fc) #define START_GAP 48*8 // was 250 // SPEC: 1*8 to 50*8 - typ 15*8 (15fc)
#define WRITE_GAP 20*8 // was 160 // SPEC: 1*8 to 20*8 - typ 10*8 (10fc) #define WRITE_GAP 18*8 // was 160 // SPEC: 1*8 to 20*8 - typ 10*8 (10fc)
#define WRITE_0 18*8 // was 144 // SPEC: 16*8 to 32*8 - typ 24*8 (24fc) #define WRITE_0 24*8 // was 144 // SPEC: 16*8 to 32*8 - typ 24*8 (24fc)
#define WRITE_1 50*8 // was 400 // SPEC: 48*8 to 64*8 - typ 56*8 (56fc) 432 for T55x7; 448 for E5550 #define WRITE_1 54*8 // was 400 // SPEC: 48*8 to 64*8 - typ 56*8 (56fc) 432 for T55x7; 448 for E5550
#define READ_GAP 15*8 #define READ_GAP 15*8
// VALUES TAKEN FROM EM4x function: SendForward // VALUES TAKEN FROM EM4x function: SendForward
@ -474,9 +474,9 @@ void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
StopTicks(); StopTicks();
} }
// note: a call to FpgaDownloadAndGo(FPGA_BITSTREAM_LF) must be done before, but
// this may destroy the bigbuf so be sure this is called before calling SimulateTagLowFrequencyEx
void SimulateTagLowFrequencyEx(int period, int gap, int ledcontrol, int numcycles) { void SimulateTagLowFrequencyEx(int period, int gap, int ledcontrol, int numcycles) {
// note this may destroy the bigbuf so be sure this is called before now...
//FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
//FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_TOGGLE_MODE ); //FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_TOGGLE_MODE );
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT); FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
@ -1107,6 +1107,7 @@ void CmdEM410xdemod(int findone, uint32_t *high, uint64_t *low, int ledcontrol)
if (ledcontrol) LED_A_ON(); if (ledcontrol) LED_A_ON();
DoAcquisition_default(-1, true); DoAcquisition_default(-1, true);
size = BigBuf_max_traceLen(); size = BigBuf_max_traceLen();
//askdemod and manchester decode //askdemod and manchester decode
if (size > 16385) size = 16385; //big enough to catch 2 sequences of largest format if (size > 16385) size = 16385; //big enough to catch 2 sequences of largest format
@ -1169,7 +1170,9 @@ void CmdIOdemodFSK(int findone, uint32_t *high, uint32_t *low, int ledcontrol) {
while (!BUTTON_PRESS() && !usb_poll_validate_length()) { while (!BUTTON_PRESS() && !usb_poll_validate_length()) {
WDT_HIT(); WDT_HIT();
if (ledcontrol) LED_A_ON(); if (ledcontrol) LED_A_ON();
DoAcquisition_default(-1, true); DoAcquisition_default(-1, true);
//fskdemod and get start index //fskdemod and get start index
WDT_HIT(); WDT_HIT();
idx = detectIOProx(dest, &size, &dummyIdx); idx = detectIOProx(dest, &size, &dummyIdx);