cancel
Showing results for 
Search instead for 
Did you mean: 

Set power level of NFC08A1

StarryLiu
Associate II

Hi!

I am currently using the X-NUCLEO-NFC08A1 and NUCLEO-F411RE boards to develop NFC-V related applications. I am encountering an issue when trying to set the power level of the NFC08A1.

I use the following function to adjust the power level:

void set_power_level(uint8_t level) {
    if (level > 15) {
        level = 15;  // Cap the level to a maximum of 15
    }
    uint16_t powerID = RFAL_ANALOG_CONFIG_CHIP_POWER_LVL_00 + level;
    ReturnCode ret = rfalSetAnalogConfig(powerID);
    if (ret != RFAL_ERR_NONE) {
        platformLog("Error setting power level: %d\n", ret);
    } else {
        platformLog("Power level set to %d\n", level);
    }
}

However, this function does not seem to work as expected. I tested the tag reading range after calling set_power_level(0) and set_power_level(15), but there was no noticeable difference.

I am wondering if this is the correct way to set the power level.

Thank you.

1 REPLY 1
Brian TIDAL
ST Employee

Hi,

The rfalSetAnalogConfig() function updates the chip with the specified analog settings of the given configuration ID. The RFAL provides a default analog configuration table. Users can either use this default table or define their own custom analog configuration table. Refer to UM2890 RF/NFC abstraction layer user manual for more details.

For the ST25R3916B, the entries for RFAL_ANALOG_CONFIG_CHIP_POWER_LVL_xx are empty in the default analog configuration table. Custom analog configurations can define these RFAL_ANALOG_CONFIG_CHIP_POWER_LVL_xx entries according to application needs. Different power steps can be defined using the rege<3:0> field in the Regulator voltage control register and the d_res<3:0> field in the TX driver register. Refer to the ST25R3916B datasheet for more details.

Feel free to provide more information about your application and explain why different power levels are required.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.