diff --git a/armsrc/lfadc.c b/armsrc/lfadc.c index 38d6558d8..20efd5c17 100644 --- a/armsrc/lfadc.c +++ b/armsrc/lfadc.c @@ -236,8 +236,13 @@ void lf_init(bool reader, bool simulate, bool ledcontrol) { FpgaSetupSsc(FPGA_MAJOR_MODE_LF_READER); // When in reader mode, give the field a bit of time to settle. - // 313T0 = 313 * 8us = 2504us = 2.5ms Hitag2 tags needs to be fully powered. - SpinDelay(10); + // Optimal timing window for LF ADC measurements to be performed: + // minimum: 313T0 = 313 * 8us = 2504us = 2.50ms - Hitag2 tag internal powerup time + // 280T0 = 280 * 8us = 2240us = 2.24ms - HitagS minimum time before the first command (powerup time) + // maximum: 545T0 = 545 * 8us = 4360us = 4.36ms - Hitag2 command waiting time before it starts transmitting in public mode (if configured so) + // 565T0 = 565 * 8us = 4520us = 4.52ms - HitagS waiting time before entering TTF mode + // Thus (2.50 ms + 4.36 ms) / 2 ~= 3 ms, should be a good timing for both tag models + SpinDelay(3); // Steal this pin from the SSP (SPI communication channel with fpga) and use it to control the modulation AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;