cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Antenna Tuning - ST25R3914

APant.2
Associate III

All,

Background

I am currently working on a project that uses the ST25R3914 nfc chip and would like to implement the Automatic Antenna Tuning (AAT) feature. After looking at the data sheet, it states that chip can perform antenna tuning automatically by sending it the direct command Calibrate Antenna. Great. I then looked through the RFAL library to see if there was an API function I could call that would execute this command, and I found rfalCalibrate.

This makes it easier to implement because I can now call the function mentioned above and the antenna will be tuned, but I had a few questions:

  1. When should I call this function? Should it be done after every tag that is detected?
  2. How often should it be called?
  3. Is there a configuration variable/register that needs to be set to get this feature to work?

Your expertise is greatly appreciated here.

Thank you in advance!

Adan

18 REPLIES 18

Hi,

I would rather look at what the chip internal phase and amp measurement are revealing. I think 16 deg would be outside of the range of the chip internal measurements.

Please refer to the section in the DS about "Measure Phase":

0693W00000UoV2XQAV.png 

Best Regards, Ulysses

APant.2
Associate III

Ulysses,

I measured the phase and amplitude, along with the calibration display register, right after initialization (since the system automatically performs a calibrate call) and this is what I got:

  • Phase - 130 or 88.8 deg.
  • Amplitude - 255
  • Calibration display - 224 (0b11100000)

I then modified the program to not perform any card detection and instead periodically recalibrated the antenna. I remeasured the values listed above right after the calibrate call and got roughly the same values. Phase is was the only parameter that seemed to change between 130 and 128.

I am going to attempt this again, but with the algorithm enabled. I'll reply with the results.

Thanks,

Adan

It appears that when I add the algorithm, it causes the calibration to mess up. The values I got from the registers are:

  • Phase - 129 or 89.3 deg
  • Amplitude - 255
  • Calibration display - 248 (0b1111_1000)

I then reset the system and checked the values right after initialization and got the same results as above.

Maybe the way I am calling calibrate is incorrect? For testing purposes, this is what I've been doing

0693W00000UoXlUQAV.pngWhere NFC_RunDetectionAlgorithm is the state machine shown in the example code provided by ST.

Thanks,

Adan

Hi Adan,

What is the value of your antenna target register. A value of 16 does not sound plausible and I would rather set it to 90 as this is also what is reported.

Also amplitude of 255 hints incorrect voltage divider and RFI inputs overloaded/saturated (symbol VRFI_A). Please discuss with your hardware engineer.

To better analyze you need to sweep through all 16 trim values (tre bits) and record measured amplitude and phase.

Please ask yourself / your hardware engineer what you want to achieve with antenna calibration (see above).

Best Regards, Ulysses

APant.2
Associate III

Ulysses,

I did not change the antenna target register, it was left at its default ( 90 deg ).

I will discuss the potential hardware issues with the engineer and also record the data you suggest.

We've already had the discussion on what we want to achieve with the active antenna tuning. Because we are placing it on a moving part, the antenna has been shown to get detuned (from previous designs). This is why calibrating the antenna would be necessary.

Thanks,

Adan

APant.2
Associate III

I went through all 16 trim values as you recommended and it appears that no combination of tre bits gets the phase to exactly 90 deg. As mentioned before, the default 90 deg target was used.

I have attached an excel document showing the results I obtained. I used two different boards and wrote down my results.

After looking at the results, is it safe to assume that the reason why tri_err bit is being set is because during the calibration sequence, the chip was not able to get the 90 deg target?

Also, to me, it appears that there are two paths forward in my situation:

  1. The hardware engineer changes the cap values to allow the system to achieve the 90 target (hardware fix), or ..
  2. In software I change the target phase to be, say 80, as an example.

Would you agree? Oh and also fix the amplitude issue you mentioned in your previous post.

Thanks,

Adan

Hi Adan,

correct, chip could not get close enough to 90deg. Your approach sounds good.

BR, Ulysses

APant.2
Associate III

Ulysses,

I assume the equation, deg = 30 + [ ( (255 - x) / 255 ) * 120 ], is used to determine what value to write to the target register? Where if you want a 70 deg phase shift, you solve for x. The value you get for x is then written to the register.

Thanks,

Adan

correct.