2025-03-10 9:05 PM
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);
}
2025-03-10 10:01 PM
I performed refWU.enabled = false and it worked. The AAT was working from the begining.
2025-03-11 2:06 AM
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