2024-03-01 10:21 PM
I'm new to ST25R2916B programming and the RFAL NFC library. I'm currently writing board bring-up firmware and would like to know the correct way of updating the AAT A/B values in both the CHIP_INIT and POLL_COMMON modes of the Analog Config table while keeping all the other parameters in their default values. I currently read the AAT A/B values from Flash and would like to load it in the Analog config table on start-up.
Questions:
Responses are appreciated. Thanks.
Solved! Go to Solution.
2024-03-05 04:21 AM
Hi jkullds,
For re-applying the CHIP_INIT section of the analog configs cleanly it is necessary to go again through rfalInitialize().
Typically rfalSetAnalogConfig(xyz) is to be called by rfal during its operation.
I am not sure what you are trying to achieve with AAT? If not using card emulation/listen mode, you could also just remove all AAT settings from the analog config and just modify the AAT registers during operation.
BR, Ulysses
2024-03-03 11:57 PM
Hi jkullds,
The flow envisioned by us is to use the GUI (e.g. e.g. STSW-ST25R010 from STEVAL-25R3916B) to load and modify an existing analog config table. It can then be exported as a c file which can be included into your firmware project.
The other function you were mentioning are more for runtime updates of the complete table from a PC GUI.
Alternatively you can also go to rfal_analogConfigTbl.h and adapt the AAT settings.
Banging the register will not work as you describe it as different settings are used for reader vs card emulation mode and your settings will be overwritten.
Regards, Ulysses
2024-03-04 07:21 AM
Thanks, Ulysses.
I did end up going into the Discovery GUI and exported the Analog Config table from there. In essence, I now have a "custom" analog config table (even though it contains the default values from GUI). I enabled the RFAL_ANALOG_CONFIG_CUSTOM define so the RFAL library is now using my custom table.
During startup, I read my AAT A/B values from Flash and copy those values in the AAT A/B for both CHIP_INIT and POLL_COMMON configs in the my custom table. I used the rfalAnalogConfigListReadRaw() and
2024-03-05 04:21 AM
Hi jkullds,
For re-applying the CHIP_INIT section of the analog configs cleanly it is necessary to go again through rfalInitialize().
Typically rfalSetAnalogConfig(xyz) is to be called by rfal during its operation.
I am not sure what you are trying to achieve with AAT? If not using card emulation/listen mode, you could also just remove all AAT settings from the analog config and just modify the AAT registers during operation.
BR, Ulysses
2024-03-05 05:47 AM
Hi Ulysses,
We have a custom antenna board for a reader board using ST25R3916. Since we can't hook up the custom antenna board to the Discovery GUI, my board bring-up FW will do the antenna tuning. We will save the AAT values resulting from that tuning to Flash. Every time we power up the boards, we will load the AAT values from Flash for the reader board to use.
Given what I described, do you think updating the AAT values in the custom Analog config table is still the way to go? You mentioned removing AAT from the table and just writing directly to the AAT registers but since we're doing RFID reading, I don't think that will work, right?
Thanks.
2024-03-05 11:36 PM
Hi,
in case you don't require different settings for AAT in Card Emulation/Listen vs Poll mode then there is no problem with such an approach (especially in the prototyping phase): AAT registers will keep its content until next time doing SETDefault(only rfalIntialize()) is doing that in our driver or when they are in the Analog configs.
On the GUI of STEVAL-25R3916B we are even providing an analog config without the AAT registers to be able to play with our tuning algorithm to see its effects on card reading.
BR, Ulysses