This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
for the past few days i'm programming TRF7970A EVM with my own source code. I would like to read ISO15693 tag ID.
My problem is that TRF7970 keeps sending me interrupt on IRQ pin (13) with frequency around 2kHz and if i read value of IRQ status register i get (0xC6).
My TRF initial settings are:
Delay_ms(2);
SPI_SS_HIGH;
Delay_ms(4);
ENABLE;
Delay_ms(1);
SPI_send_command(SOFT_INIT);
SPI_send_command(IDLE);
Delay_ms(3);
SPI_send_command(RESET);
Delay_ms(2);
*spi.txbuf = 0x31; //Chip status control
*(spi.txbuf + 1) = 0x02; //Iso control
*(spi.txbuf + 2) = 0x00; //ISO mode Option 1
*(spi.txbuf + 3) = 0x00; //ISO mode Option 2
*(spi.txbuf + 4) = 0xC1; //TX timer
*(spi.txbuf + 5) = 0xBB; //TX timer low
*(spi.txbuf + 6) = 0x00; //TX Pulse length Control
*(spi.txbuf + 7) = 0x25; //RX No Response Wait time
*(spi.txbuf + 8) = 0x1F; //RX Wait time
*(spi.txbuf + 9) = 0x31; //Modulator control
*(spi.txbuf + 10) = 0x40; //RX special settings
*(spi.txbuf + 11) = 0x87; //Regulator control
SPI_write(12, CHIP_STATUS_CONTROL);
Delay_ms(1);
*spi.txbuf = 0x3F; //Enable no response interrupt
SPI_write(1, IRQ_MASK);
*spi.txbuf = 0x00;
SPI_write(1, NFC_TARGET_LEVEL );
And my commands for reading tag ID:
SPI_send_command(RESET);
SPI_send_command(TRANSMIT_CRC);
spi.txbuf[0] = 0x26;
spi.txbuf[1] = 0x01;
spi.txbuf[2] = 0x00;
FIFO_write(3);
Can you please give me some advice what i'm doing wrong
Hello Jan,
What Josh said is correct.
That said, I don't recommend you develop your own firmware from scratch. Please leverage TI examples as we have spent a lot of time and effort to create robust code which handles the device correctly including with error recovery. You would be doing yourself a disservice to 'reinvent the wheel' by trying to go down this road on your own. Trust me, it's a long road.
I would recommend leveraging this code example: http://www.ti.com/lit/zip/sloc297
Thank you for sending me the project. I will try it and report back on how it works.
Best regards,
Jan Slapsak
I tried with your project and it worked. I was curious what was wrong with my code in i suppose my interrupt handling wasn't written properly. I also noticed that if a tag is present in a field of TRF7970 while RF recievers and transmitters are turned on and if you remove tag from the field TRF7970 sends an interrupt. So now i'm disabling RF transmitter and receiver after i get ID from the tag and that's it. Thank you for your time and help.
Best regards.
Jan Slapsak