*/
// At TIMER_CLOCK3 (MCK/32)
-//#define RWD_TIME_1 150 /* RWD_TIME_PAUSE off, 80us on = 100us */
-//#define RWD_TIME_0 90 /* RWD_TIME_PAUSE off, 40us on = 60us */
-//#define RWD_TIME_PAUSE 30 /* 20us */
-
// testing calculating in (us) microseconds.
#define RWD_TIME_1 120 // READER_TIME_PAUSE 20us off, 80us on = 100us 80 * 1.5 == 120ticks
#define RWD_TIME_0 60 // READER_TIME_PAUSE 20us off, 40us on = 60us 40 * 1.5 == 60ticks
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DIN;
// calibrate the prng.
- //
legic_prng_forward(2);
// precompute the cipher
// Switch on carrier and let the tag charge for 1ms
HIGH(GPIO_SSC_DOUT);
- WaitUS(1000);
+ WaitUS(100);
ResetTicks();
LOW(GPIO_SSC_DOUT);
WaitUS(20);
WDT_HIT();
- set_tracing(FALSE);
}
// calculate crc4 for a legic READ command
// 460 | 690
// 258 | 387
// 244 | 366
- WaitTicks(387);
- legic_prng_forward(4); // 460 / 100 = 4.6 iterations
+ WaitTicks(495);
+ legic_prng_forward(3); // 460 / 100 = 4.6 iterations
frame_sendAsReader(cmd, cmd_sz);
frame_receiveAsReader(¤t_frame, 12);