From d88d1207732a80156b5d2725b4c22869ef0b3d36 Mon Sep 17 00:00:00 2001 From: henryk Date: Tue, 11 Dec 2007 18:48:39 +0000 Subject: Several modifications to enable spinning until the correct phase is reached in tc_fdt (thereby taking the phase information from tc_fdt, resetting the phase in tc_cdiv) Still too much jitter (some bug in this code?) git-svn-id: https://svn.openpcd.org:2342/trunk@383 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/iso14443_layer3a.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'openpicc/application/iso14443_layer3a.h') diff --git a/openpicc/application/iso14443_layer3a.h b/openpicc/application/iso14443_layer3a.h index 0c2a909..b71c13f 100644 --- a/openpicc/application/iso14443_layer3a.h +++ b/openpicc/application/iso14443_layer3a.h @@ -16,17 +16,18 @@ enum ISO14443_STATES { }; /******************** RX ************************************/ -/* measured TF->FIQ->SSC TX start delay (~3.480us) in carrier cycles */ -#define TF_FIQ_SSC_DELAY 47 -//#define TF_FIQ_SSC_DELAY 40 -#define FALLING_EDGE_DETECTION_DELAY 12 +/* Magic delay, don't know where it comes from */ +#define MAGIC_DELAY -32 +/* See fdt_timinig.dia for these values */ +#define MAX_TF_FIQ_ENTRY_DELAY 16 +#define MAX_TF_FIQ_OVERHEAD 75 /* guesstimate */ extern volatile int fdt_offset; /* standard derived magic values */ #define ISO14443A_FDT_SLOTLEN 128 #define ISO14443A_FDT_OFFSET_1 84 #define ISO14443A_FDT_OFFSET_0 20 -#define ISO14443A_FDT_SHORT_1 (ISO14443A_FDT_SLOTLEN*9 + ISO14443A_FDT_OFFSET_1 -FALLING_EDGE_DETECTION_DELAY +fdt_offset -TF_FIQ_SSC_DELAY) -#define ISO14443A_FDT_SHORT_0 (ISO14443A_FDT_SLOTLEN*9 + ISO14443A_FDT_OFFSET_0 -FALLING_EDGE_DETECTION_DELAY +fdt_offset -TF_FIQ_SSC_DELAY) +#define ISO14443A_FDT_SHORT_1 (ISO14443A_FDT_SLOTLEN*9 + ISO14443A_FDT_OFFSET_1 +fdt_offset +MAGIC_DELAY) +#define ISO14443A_FDT_SHORT_0 (ISO14443A_FDT_SLOTLEN*9 + ISO14443A_FDT_OFFSET_0 +fdt_offset +MAGIC_DELAY) #ifdef FOUR_TIMES_OVERSAMPLING /* definitions for four-times oversampling */ -- cgit v1.2.3