cancel
Showing results for 
Search instead for 
Did you mean: 

RFAL demo question

JLee.47
Associate II

Hello, I am using the polling demo example from the RFAL library (STM32CubeExpansion_NFC6_V1.1.0) and added it to my custom application.

My work now just requires me to use NFC-V tags. Therefore, I only selected RFAL_FEATURE_NFCV but it appears the code doesn't sense the tags in my application. The RFAL initialization is successful too.

I have included a screenshot of the RFAL Features Configuration from platform.h. I have disabled a number of RFAL support because I won't be using them.

Does some features need to be enabled in order for tag detection to work (ex. LISTEN MODE or WAKEUP mode)?

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi JLee.47,

please make sure you also adapted the parameters you provide to rfalNfcDiscover(). I assume this function is returning ERR_REQUEST in your reconfigured application and then the polling does not start.

Best Regards, Ulysses

View solution in original post

3 REPLIES 3
Ulysses HERNIOSUS
ST Employee

Hi JLee.47,

please make sure you also adapted the parameters you provide to rfalNfcDiscover(). I assume this function is returning ERR_REQUEST in your reconfigured application and then the polling does not start.

Best Regards, Ulysses

JLee.47
Associate II

Thanks for your reply. There is no error associated with rfalNfcDiscover(). The parameters used (as per my platform.h settings) are:

    discParam.compMode   = RFAL_COMPLIANCE_MODE_NFC;

    discParam.devLimit   = 1U;

    discParam.nfcfBR    = RFAL_BR_212;

    discParam.ap2pBR    = RFAL_BR_424;

    discParam.maxBR     = RFAL_BR_KEEP;

     

    ST_MEMCPY( &discParam.nfcid3, NFCID3, sizeof(NFCID3) );

    ST_MEMCPY( &discParam.GB, GB, sizeof(GB) );

    discParam.GBLen     = sizeof(GB);

    discParam.notifyCb       = demoNotif;

    discParam.wakeupEnabled    = false;

    discParam.wakeupConfigDefault = true;

    discParam.totalDuration    = 1000U;

    discParam.techs2Find     |= RFAL_NFC_POLL_TECH_V;

discParam.techs2Find |= RFAL_NFC_POLL_TECH_AP2P;

After successful rfal initialization, my app proceeds to call demoCycle() on a regular basis in an attempt to poll for rfid tag detection.

The state machine (in demoCycle function) goes from DEMO_ST_START_DISCOVERY to DEMO_ST_DISCOVERY. Then, it gets stuck in DEMO_ST_DISCOVERY. After some debugging, I discovered that the very first time, the function rfalNfcGetState() gave RFAL_NFC_STATE_POLL_TECHDETECT and repeated calls to it always yielded RFAL_NFC_STATE_LISTEN_TECHDETECT.

I am not sure why it is stuck in the RFAL_NFC_STATE_LISTEN_TECHDETECT state, and not able to detect the rfid tag (NFC-V). Did I miss some RFAL settings in platform.h? Perhaps some wrong parameters used for rfalNfcDiscover()?

Any help will be greatly appreciated.

Brian TIDAL
ST Employee

Hi,

 on my side, I use the following config and am able to detect properly type-V:

#define RFAL_FEATURE_LISTEN_MODE               false
#define RFAL_FEATURE_WAKEUP_MODE               false
#define RFAL_FEATURE_NFCA                      false
#define RFAL_FEATURE_NFCB                      false
#define RFAL_FEATURE_NFCF                      false
#define RFAL_FEATURE_NFCV                      true 
#define RFAL_FEATURE_T1T                       false
#define RFAL_FEATURE_T2T                       false
#define RFAL_FEATURE_T4T                       false
#define RFAL_FEATURE_ST25TB                    false
#define RFAL_FEATURE_ST25xV                    true 
#define RFAL_FEATURE_DYNAMIC_ANALOG_CONFIG     false
#define RFAL_FEATURE_DPO                       false
#define RFAL_FEATURE_ISO_DEP                   false
#define RFAL_FEATURE_ISO_DEP_POLL              false
#define RFAL_FEATURE_ISO_DEP_LISTEN            false
#define RFAL_FEATURE_NFC_DEP                   false

Can you share more details about the tags you are using (manufacturer and model)? Can you try to use an NFC enabled Android phone and check that the tag is not damaged and that the phone is able to properly read it (you can use ST25 NFC Tap on your Android phone)? Can you also revert to the original application and check that the reader is able to read different kind of tags (Type-A for example) to make sure the reader PCB/antenna is not damaged? Can you probe the RF field with a scope to make sure the antenna is not damaged?

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.