From ed5367a124dfb55d090c9d5ad72e540f26fe774c Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 30 Jun 2018 22:48:59 +0200 Subject: [PATCH] chg: adjusting 14b demod to increase reading distance --- armsrc/iso14443b.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/armsrc/iso14443b.c b/armsrc/iso14443b.c index 689522ef6..58610b8c3 100644 --- a/armsrc/iso14443b.c +++ b/armsrc/iso14443b.c @@ -845,7 +845,7 @@ static RAMFUNC int Handle14443bTagSamplesDemod(int ci, int cq) { } } else { // low phase of SOF too long (> 12 etu) - if (Demod.posCount > 12*2) { + if (Demod.posCount > 14*2) { Demod.state = DEMOD_UNSYNCD; LED_C_OFF(); } @@ -858,7 +858,7 @@ static RAMFUNC int Handle14443bTagSamplesDemod(int ci, int cq) { MAKE_SOFT_DECISION(); if (v > 0) { - if (Demod.posCount > 3*2) { // max 19us between characters = 16 1/fs, max 3 etu after low phase of SOF = 24 1/fs + if (Demod.posCount > 6*2) { // max 19us between characters = 16 1/fs, max 3 etu after low phase of SOF = 24 1/fs Demod.state = DEMOD_UNSYNCD; LED_C_OFF(); } @@ -987,15 +987,6 @@ static void GetTagSamplesFor14443bDemod() { if ( upTo ) upTo = NULL; - /* - if (MF_DBGLEVEL >= 3) { - Dbprintf("Demod.state = %d, Demod.len = %u", - Demod.state, - Demod.len - ); - } - */ - // print the last batch of IQ values from FPGA if (MF_DBGLEVEL == 4) Dbhexdump(ISO14443B_DMA_BUFFER_SIZE, (uint8_t *)dmaBuf, false); @@ -1341,7 +1332,7 @@ void iso14443b_setup() { // Signal field is on with the appropriate LED FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_READER_TX | FPGA_HF_READER_TX_SHALLOW_MOD); - SpinDelay(100); + SpinDelay(300); // Start the timer StartCountSspClk();