Skip to main content
Associate II
March 11, 2025
Solved

Capacitive wakeup and AAT with ST25R3911B RFAL

  • March 11, 2025
  • 1 reply
  • 475 views

Hello, I couldn't find any examples with RFAL to use capacitive sensing and the usage of AAT. I'm using a single ended matched antenna. I tried using rfalAdjustRegulators(), it always gives a value of 3000. I also wanted capacitive sensing: the chip should wakeup and start polling only when a capacitance change is detected on the capacitive pads, otherwise it should be in low power mode (if possible). I've included the code I'm using. The function stateCB is being called frequently. I don't believe it's being triggered by capacitive sensing.

 

rfalAnalogConfigInitialize();
	PERFORM_WITH_LOG(err, rfalNfcInitialize());
	PERFORM_WITH_LOG(err, st25r3911SetAntennaMode(true, false));
	rfalWakeUpConfig wakeupConf = {.period = RFAL_WUM_PERIOD_100MS,
																 .irqTout = false,
																 .refWU =
																		 {
																				 .enabled = true,
																				 .refDelay = RFAL_WUM_PERIOD_100MS,
																		 },
																 .indAmp =
																		 {
																				 .enabled = false,
																		 },
																 .indPha =
																		 {
																				 .enabled = false,
																		 },
																 .cap = {.enabled = true,
																				 .delta = 3,
																				 .reference = RFAL_WUM_REFERENCE_AUTO,
																				 .autoAvg = true,
																				 .aaInclMeas = true,
																				 .aaWeight = RFAL_WUM_AA_WEIGHT_8}};

	rfalNfcDiscoverParam discParam = {.compMode = RFAL_COMPLIANCE_MODE_NFC,
																		.techs2Find = RFAL_NFC_POLL_TECH_A,
																		.techs2Bail = 0,
																		.totalDuration = 0U,
																		.devLimit = MAX_DEVICES,
																		.maxBR = RFAL_BR_106,
																		.GBLen = sizeof(GB),
																		.p2pNfcaPrio = false,
																		.isoDepFS = RFAL_ISODEP_FSXI_512,
																		.nfcDepLR = RFAL_NFCDEP_LR_254,
																		.notifyCb = stateCB,
																		.wakeupEnabled = true,
																		.wakeupConfigDefault = false,
																		.wakeupConfig = wakeupConf,
																		.wakeupPollBefore = true,
																		.wakeupNPolls = 1};
	memcpy(discParam.nfcid3, NFCID3, sizeof(NFCID3));
	memcpy(discParam.GB, GB, sizeof(GB));
	err = rfalNfcDiscover(&discParam);
	platformLog("Error in discover: %d\n", err);
for (;;)
{
 rfalNfcWorker();
 delay(10);
}

 

 

This topic has been closed for replies.
Best answer by rabinniroula

I performed refWU.enabled = false and it worked. The AAT was working from the begining.

1 reply

rabinniroulaAuthorBest answer
Associate II
March 11, 2025

I performed refWU.enabled = false and it worked. The AAT was working from the begining.

Ulysses HERNIOSUS
Technical Moderator
March 11, 2025

Hi,

in this case the module should have told you such as it should return an error:

 if( ...
 ((gRFAL.wum.cfg.refWU.enabled) && ((gRFAL.wum.cfg.cap.enabled) || 
 ... )
 {
 return RFAL_ERR_PARAM;
 }

I presume your request is resolved?

BR, Ulysses