cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3916B - Modify Example NFC08A1 to custom single ended antenna

ABatt.1
Senior

Hi everyone,
I have difficulty understanding in which part of the code to intervene to modify the RFAL example code in card emulation to adapt it to my hardware.

The example works perfectly on the NUCLEO-F401RE with X-NUCLEO-NFC08A1. Now that I have built the prototype hardware, I need to modify the register configuration to handle a single ended antenna without AAT.

from AN5592from AN5592

 

Looking at the code, it seems to me that the file to modify is rfal_analogConfigTbl.h, but I can't figure out how to modify it.

Could you give me some pointers?

 

Thanks to all.

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi ABatt.1,

 

in the AC you find first level: Entries for different moments of operation. For a use case like yours you want to adapt the CHIP_INIT sections:

MODE_ENTRY_17_REG( (RFAL_ANALOG_CONFIG_TECH_CHIP | RFAL_ANALOG_CONFIG_CHIP_INIT)

The 17 denotes how many Register-Mask-Value pairs are following - in this case 17. You need to adapt when adding or removing entries below.

Looking at one entry:

, ST25R3916_REG_IO_CONF2,  ST25R3916_REG_IO_CONF2_aat_en, ST25R3916_REG_IO_CONF2_aat_en 

This specifies to change register IO_CONF2 (address 0x01), mask bit aat_en (bit pos 5) and actually sets the same bit.

This file is a file internal to RFAL and provides a good start for most use cases. Typically you can provide your own version of analog configs by setting RFAL_ANALOG_CONFIG_CUSTOM - avoiding to change the RFAL default one.

In your antenna config I don't see variable capacitors so you could actually remove above line and also all others having "ANT_TUNE". Then for single ended you would need to add a line:

 

, ST25R3916_REG_IO_CONF1,  ST25R3916_REG_IO_CONF1_single, ST25R3916_REG_IO_CONF1_single

 

BR, Ulysses

 

View solution in original post

3 REPLIES 3
Ulysses HERNIOSUS
ST Employee

Hi ABatt.1,

 

in the AC you find first level: Entries for different moments of operation. For a use case like yours you want to adapt the CHIP_INIT sections:

MODE_ENTRY_17_REG( (RFAL_ANALOG_CONFIG_TECH_CHIP | RFAL_ANALOG_CONFIG_CHIP_INIT)

The 17 denotes how many Register-Mask-Value pairs are following - in this case 17. You need to adapt when adding or removing entries below.

Looking at one entry:

, ST25R3916_REG_IO_CONF2,  ST25R3916_REG_IO_CONF2_aat_en, ST25R3916_REG_IO_CONF2_aat_en 

This specifies to change register IO_CONF2 (address 0x01), mask bit aat_en (bit pos 5) and actually sets the same bit.

This file is a file internal to RFAL and provides a good start for most use cases. Typically you can provide your own version of analog configs by setting RFAL_ANALOG_CONFIG_CUSTOM - avoiding to change the RFAL default one.

In your antenna config I don't see variable capacitors so you could actually remove above line and also all others having "ANT_TUNE". Then for single ended you would need to add a line:

 

, ST25R3916_REG_IO_CONF1,  ST25R3916_REG_IO_CONF1_single, ST25R3916_REG_IO_CONF1_single

 

BR, Ulysses

 

ABatt.1
Senior

HI Ulysses,

Thanks for you response.

I will try to configure the registers appropriately according to my antenna.

The complicated part will be tuning the antenna, can you give me some suggestions to start from (AN, or old posts)? Thank you!

Hi,

AN5276.

Regards, Ulysses