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.

TRF7970A: Code Example

Part Number: TRF7970A

Customer trying to port example code to non-TI MCU. Trying to get the reader to detect if a tag is present and not worry about any error handling or collision events.  Goal is to be able to initialize TRF7970A, then present a tag to the antenna, then check if the IRQ pin toggles, and finally read the FIFO data.

 

1.       The datasheet mentions that the IRQ pin will be toggled under certain events that correlate with the IRQ Status Register (0x0C), but they don’t see it toggling with the code that they wrote (probably due to missing some logic in the code).  They followed a similar sequence to the sample code provided online, but am I missing something? 

1.       Initialize TRF7970A chip per 6.11 in the datasheet

2.       Set Chip Status Register set to 0x21 to turn on RF field

3.       Set ISO control register to 0x02

4.       Set Modulator control register to 0x01

5.       Set Register 0x07 to 0x15

6.       Set Adjustable FIFO level to 0x0C

7.       Set register 0x18 to 0x00

8.       Present tag to Antenna and check if IRQ pin is toggling (they see nothing happening and the IRQ Status register is always returning 0)

2.       As a follow up question for #1, the sample code issues an inventory command after step 7 while trying to find the tag which ends up calling other commands from the ISO protocol code files.  Does the inventory command need to be issued before the TRF7970A can detect a tag (so that would be the reason why they never see the IRQ pin toggling)?

3.       The datasheet talks about how all the ISO protocol handling can be bypassed when using the chip, but they see a lot of code that seems to be handling the protocols via code.  Is there any way around this or do we still need to set up all the code for the ISO protocol?  They were hoping to just read from the FIFO buffer once the IRQ pin toggles and see what the data is, but it doesn’t seem to be that simple.

  • Hello Lawrence,

    IRQ toggles based on TX and RX events for RF Communication. Configuring the device does not cause the IRQ to toggle. Sending a data packet would.

    The Inventory command is for ISO15693 technology. They need to understand what tag technology they are using and send out the correct command for that whether it's Inventory for ISO15693 or REQA/WUPA for ISO14443A etc.

    Yes a command needs to be issued before IRQ will toggle. This is done in the example code and should have already been part of their porting process, I don't understand how they haven't ported command sending already...

    I don't fully understand Question 3. The device has to be setup for the proper ISO protocol, a command must be issued, the command issuing must be verified by receiving IRQ for 0x80 - TX Complete, and then the FIFO must be cleared in order to receive a response from the tag.

    "They were hoping to just read from the FIFO buffer once the IRQ pin toggles and see what the data is, but it doesn’t seem to be that simple."

    The TRF7970A is a complicated device as it an NFC transceiver that requires careful control from the microcontroller to operate correctly. TI Example Code covers all the required operations for all supported tag types, this work has been done by us for ease of use for customers. It sounds like they are doing a partial port and running into issues as a result. That approach to me is trying to cut corners, and why they have any issues at all. They need to port the entire NFC stack and application code to get results. After they validate the stack is functional on their MCU, then they can modify the application for their needs.