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: Issues reading correct RSSI

Part Number: TRF7970A

Hello,

I am working with NXP's MK22FN1M0AVLQ12, along with the TRF7970A, in their MCUXpresso IDE v10.3.1.

I'm already able to communicate with the TRF reader over SPI, and read/write tags. The problem I'm currently having is with reading RSSI relative to the tag.

As I move the tag closer to the reader, I get external RSSI values closer to 7, which makes sense.

As I move it farther from the reader, I move from 7 towards 3, and then suddenly lose connection. This makes less sense - I should be going down from 7 to 0, before losing connection. I am wondering if I am doing something wrong with regards to methodology used for reading RSSI.

I'm using a 5V input setup.

The values of the TRF registers before I run the Read Rssi Command are:

Register: 0 Value: 21
Register: 1 Value: 88
Register: 2 Value: 0
Register: 3 Value: 0
Register: 4 Value: c1
Register: 5 Value: 9d
Register: 6 Value: 20
Register: 7 Value: e
Register: 8 Value: 7
Register: 9 Value: 1
Register: a Value: 20
Register: b Value: 7
Register: c Value: 0
Register: d Value: 3e
Register: e Value: 17
Register: f Value: 40
Register: 10 Value: 0
Register: 11 Value: 0
Register: 16 Value: 0
Register: 17 Value: 0
Register: 18 Value: 0
Register: 19 Value: 0
Register: 1a Value: 0
Register: 1b Value: 0
Register: 1c Value: 0
Register: 1d Value: 0
Register: 1e Value: 0
Register: 1f Value: 3a

And here is my actual read rssi function:

void Trf7970ReadExternalRssi(uint8_t *pbuf)
{
/* Methodology described in TRF7970A datasheet page 28 */

/* Turn on receiver for external RF field measurement */
command[0] = CHIP_STATE_CONTROL; // CHIP_STATE_CONTROL = 0x00
command[1] = V_IN_5V_RF_ON_REC_ON; // V_IN_5V_RF_ON_REC_ON = 0x23
SpiWriteSingle(command);

/* Enable receiver */
command[0] = RUN_DECODERS; // RUN_DECODERS = 0x17
SpiDirectCmd(command);

/* Send command to measure RSSI */
command[0] = CHECK_EXTERNAL_RF; // CHECK_EXTERNAL_RF = 0x19
SpiDirectCmd(command);

/* Delay by more than 50 us */
PIT_MicrosecondDelay(200); //delay by 200 us

/* Read RSSI register */
*pbuf = RSSI_LEVELS; // RSSI_LEVELS = 0x0F
*(pbuf+1) = SPECIAL_FUNCTION; // SPECIAL_FUNCTION = 0x10
SpiReadCont(pbuf, 2);

/* Revert Chip state control reg to receiver turned off */
Trf7970TurnRfOn(); //Write 0x21 to the CHIP_STATE_CONTROL register
}

If there is any other information that might be helpful for me to provide, please let me know what that might be!

Thanks,

Ben

  • Hello Ben,

    have you checked if your tag is still sending a response at that distance.

    Regards,

    Helfried

  • Hi Helfried,

    Thank you for your reply!

    At every distance interval (moving along the Z-X plane at 1mm increments), I am polling for the tag, reading the tag UID on connection, and writing to every page of user memory in the tag, in order to see at what distances the current antenna I'm working with will have a good enough connection to do a full tag write. Generally, I will either (1) get a successful read of the UID and successful wipe of the tag (writing zeros to every page), or (2) will fail to connect to the tag - ie, my polling command will fail and the tag won't reply. Occasionally, (3) I will successfully read the UID, read the RSSI, but fail in writing every page to the tag's user memory, as with my output shown below:

    Its strange though - at a distance of 5mm in the Z axis, and 12mm in the X axis, I am getting a full connection - case 1 - as shown below, with an RSSI of 3:

    But when I move over a single mm in the X axis - to 13mm, I get the output shown below, indicating the tag cannot be found:

    In between the 12 and 13mm increments, I either connect to the tag with an RSSI of 3, or fail to connect at all. This is my issue - I should not be going straight from an RSSI of 3 to a failed connection - and is why I suspect I am doing something wrong with regards to measuring the RSSI.

  • Update: 

    I have jumper-ed out the SPI from my MCU to a muRata eval kit board with the TRF7970A on it (as shown here: https://www.murata.com/~/media/webrenewal/products/rfid/rfid/hf/starterkit/pdf/hf%20rfid%20reader%20writer%20kit%20preliminary%20datasheet%20rev02_180601.ashx?la=en-us) and am running the same firmware to determine RSSI. 

    Now, I seem to get RSSI values ranging from 5, when the tag is place directly over the antenna, to zero, when the tag is pulled farther away.

    This suggests to me that the firmware is working correctly and the antenna design on the starter kit board simply isn't capable of RSSI values of 6 or 7.

    If this is in fact the case... then I do not understand why, with the other antenna, I go from RSSI's of 3 to being incapable of communicating with the tag at all.

  • Hello Ben,

    the RSSI measures the strength of the received signal. This is only possible if the tag is still sending a response. In case the fieldstrength is not sufficient to power your tag enough that it will send a response, you will get no RSSI value.

    If you have access to an oscilloscope please measure the communication between the reader and the tag. Simplest way is to connect the GND clip to the tip of the probe to build a single loop and place it between the reader and tag.

    I did a check at my setup with an ISO15693 tag which gives me RSSI readings from 0 to 7.

    Best regards,

    Helfried

  • Hi Helfried,

    The field strength is definitely strong enough to power the tag- otherwise, I suspect I'd be having issues reading and writing the tag, and measuring (albeit, possibly wrong) RSSI values. 

    I've got access to a scope, and have done as you suggested. The scope is generally picking up a 13.5 MHz, 5.6 V amplitude sine wave, when I hold the loop over the reader. 

    I'm working with ISO14443 tags - specifically, NXP NTAG213's.

    Like I previously stated, for my current antenna setup, I am able to get RSSI values between 0 and 5. For my other antenna setup, I am able to get RSSI values between 3 and 7 only.

    My concern is that, I should be able to get RSSI readings between 0 and 7, irrespective of my antenna setup. It doesn't make sense that my tag is no longer able to be detected, only a half millimeter away from where it previously had an RSSI of 3. 

    Thanks again.

    Ben

  • Hello Ben,

    The External RSSI is an attempt measure other RF fields around the device as a means to determine if there will be an RF field collision.

    What you are looking for does not need the External RSSI command. Whenever you get tag data, the RSSI register is automatically updated with the RSSI from that reception without need of a Direct Command. Try using a simple process of reading tag blocks in a loop and printing out the RSSI from Register 0x0F in a loop without using an direct commands. You should see the varied RSSI reads that way.