2022-10-12 12:40 PM
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:
Your expertise is greatly appreciated here.
Thank you in advance!
Adan
Solved! Go to Solution.
2022-10-20 11:41 PM
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":
Best Regards, Ulysses
2022-10-21 08:07 AM
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:
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
2022-10-21 08:32 AM
It appears that when I add the algorithm, it causes the calibration to mess up. The values I got from the registers are:
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
Where NFC_RunDetectionAlgorithm is the state machine shown in the example code provided by ST.
Thanks,
Adan
2022-10-24 07:55 AM
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
2022-10-24 08:21 AM
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
2022-10-24 03:50 PM
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:
Would you agree? Oh and also fix the amplitude issue you mentioned in your previous post.
Thanks,
Adan
2022-10-24 11:11 PM
Hi Adan,
correct, chip could not get close enough to 90deg. Your approach sounds good.
BR, Ulysses
2022-10-25 07:47 AM
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
2022-11-02 02:22 AM
correct.