Hello,
I am trying to read a MIFARE card. The odd thing is that after sending the REQA command after the first Interrupt with 0x80 (tx done) in the interrupt status register (0x0C) a second interrupt occurs with the value 0xC0 in the interrupt status register. The FIFO status register (0x1C) has the value 0x01 so there should be 2 bytes in the FIFO register to be read but I only read 0x00, 0x00. here is an excerpt of my code:
init procedure (taken from the StellarisWare "iso14443a.c" implementation:
WriteRFIDReg(0x00, (ReadRFIDReg(0x00, 1)|0x29), 1); //Enable RF field and receiver, 5V operation
__delay32(160000); //Wait 5ms (as per ISO 14443-3 clause 5)
WriteRFIDReg(0x06, 0x20, 1); //Set the TX pulse to 106ns (0x20 * 73.7ns)
WriteRFIDReg(0x07, 0x0e, 1); //Set the RX No response wait time ->
//to 529us (0xe * 37.76us).
WriteRFIDReg(0x08, 0x07, 1); //Set the RX wait time to 66us (7 * 9.44us)
WriteRFIDReg(0x09, 0x31, 1); //Set the SYSCLK to 13.56MHz and ->
//the Modulation Depth to OOK
WriteRFIDReg(0x0A, ((ReadRFIDReg(0x0A, 1)&0x0F)|0x20), 1); //Configure the Special Settings Register
WriteRFIDReg(0x0B, 0x80, 1); //Set the regulator voltage to be automatic
WriteRFIDReg(0x0D, (ReadRFIDReg(0x0D, 1)|0x01), 1); //enable no-response interrupt
WriteRFIDReg(0x01, 0x08, 1); //Set the ISO format to ISO1443A 106Kbps, CRC
The REQA command sequence (taken from the TRF7960EVM_SPI_REQ_A.lpf logic analyzer file):
ReadWriteSPI1 (0x8F);
ReadWriteSPI1 (0x90); //no CRC
ReadWriteSPI1 (0x3D);
ReadWriteSPI1 (0x00);
ReadWriteSPI1 (0x0F);
ReadWriteSPI1 (0x26); //REQA
This at least provokes an interrupt. I also tried the following sequence but this had no effect:
ReadWriteSPI1 (0x8F);
ReadWriteSPI1 (0x90); //no CRC
ReadWriteSPI1 (0x3D);
ReadWriteSPI1 (0x00);
ReadWriteSPI1 (0x30);
ReadWriteSPI1 (0x26); //REQA
ReadWriteSPI1 (0x01);
ReadWriteSPI1 (0x00);
The oscillator status register (0x03F) has always different values like 0x00, 0x40, 0x7F.
Any ideas what is wrong?
Best regards,
Dejan