cancel
Showing results for 
Search instead for 
Did you mean: 

What is the correct way to update AAT_A and AAT_B values in Analog Config table

jkullds
Associate II

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:

  1. I don't quite understand how to use the rfalAnalogConfigListWrite() API - is this the right API to use? For example, if I want to update the AAT A/B values in CHIP_INIT, can I pass just the new AAT A/B reg-mask-value or pass the entire list of 20 reg-mask-values found in CHIP_INIT?
  2. How do I set the Config ID for CHIP_INIT and POLL_COMMON? I looked in the config ID defines in rfal_analogConfigTbl.h and didn't find anything for these two modes.
  3. Do I need to call the rfalSetAnalogConfig() function after I change the AAT A/B values?
  4. Since I'm just doing board bring-up FW, the other option I'm thinking of is to go straight to the ST253916 APIs and use st25r3916WriteRegister() to write to the AAT A/B registers. Is this a valid option? If so, would writing to the AAT registers alone be sufficient?

Responses are appreciated. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

5 REPLIES 5
Ulysses HERNIOSUS
ST Employee

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

jkullds
Associate II

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 

rfalAnalogConfigListWriteRaw() APIs to do the updates.
 
After I write back the "new" table, are there any other calls I need to make to finalize the table update, e.g., rfalSetAnalogConfig()? I'm asking because I noticed that after I added that table update code, my Flash write operations started working every other time. This was not an issue before I added the table update code.
 
Thanks.

 

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

 

jkullds
Associate II

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.

 

 

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