2023-09-20 12:40 AM
Hello, am using RFID card reader ST25R95 using its stack. I want to reduce the fixed wake up time from 300ms to 100ms.
#define RFAL_ST25R95_IDLE_DEFAULT_WUPERIOD 0x24U /*!< Fixed WU Period to reach ~300ms timeout with Max Sleep = 0 */
Is there any method how i can reduce it, this delay is affecting my product as the user has to hold the card until it is detected.
I have also set the
RFAL WUM Period period; /*!< Wake-Up Timer period ; how often measurement(s) is performed */ ==>100ms
in struct RFAL Wake Up Config.
But it is of no use..
Is there any method how I can resolve it.
Solved! Go to Solution.
2023-09-25 04:39 AM
Hi
here are my findings:
See also UM289 RF/NFC abstraction layer (RFAL) User Manual
Rgds
BT
2023-09-20 02:01 PM
Hi,
the current instanciation of the rfalWakeUpModeStart API for the ST25R95 uses a fixed WakeUp period of 304 ms. See WU Period formula in the ST25R95 datasheet : timeout (ms) = 256 * 1/32 *(WU Period + 2) *(MaxSleep +1) with WU Period = 0x24 and MaxSleep = 0, the timeout is 304ms.
If the RFAL_ST25R95_IDLE_DEFAULT_WUPERIOD is set to 0x0A, the timeout is 96 ms (and 104ms for a WU Period = 0x0B).
Can you share more details about "this delay is affecting my product as the user has to hold the card until it is detected."? The wake up mode should be exited at worse 304 ms after a tag is presented on the antenna and then the technolody detection, collision resolution and activation activities should be quite fast. Which tag technology is being used (NFCA, B, F or V)? Which technolgies are enabled on reader side (A, B, F, V)? Which HW is being used (ST board or custom design)? Is it possible to connect a logic analyzer on the SPI + IRQ_IN + IRQ_OUT + tag present event and provide a trace?
Rgds
BT
2023-09-25 12:25 AM
Hi Brian
Please find attched the waveform(please extract it) and the link to download the viewing software.
Which tag technology is being used (NFCA, B, F or V)? NFCA
Which technolgies are enabled on reader side (A, B, F, V)? A
Which HW is being used (ST board or custom design)? Custom design board
I tried RFAL_ST25R95_IDLE_DEFAULT_WUPERIOD = 0x0A, but still am getting the wake up time as 304ms.
"The wake up mode should be exited at worse 304 ms after a tag is presented on ..." is there any method i can reduce this.
2023-09-25 04:39 AM
Hi
here are my findings:
See also UM289 RF/NFC abstraction layer (RFAL) User Manual
Rgds
BT
2023-09-25 06:31 AM
Hi Brian,
Thanks for your help, i have disabled RFAL_FEATURE_NFCB and now my polling time has reduced to 270ms.
Changing discParam.totalDuration has no effect on the above polling time.
Below is the init_Rfid code
2023-09-26 01:10 AM
Hi,
on my side, the overall technology detection + collision resolution for T2T tag has a duration of less than 45 ms. In the main NFC cycle, make sure there is no platformDelay() between each polling loop. Also make sure the main NFC cycle is called regularly (I've seen some 50ms delays in the trace so I guess some processing is done and may slow down the polling loop). Serial traces may also slow down the polling loop (use high speed such as 921600 bps + DMA). On my side the SPI is configured at 1.5 MHz, in your trace this 1MHz. You can increase the SPI to 1.5MHz but I believe this will not give a significant gain.
Fell free to share a new SPI trace with me and I will have a look on the timings.
Rgds
BT
2023-09-26 03:59 AM
Hi Brian,
I have set SPI commn speed to 2 MHZ,
This is my wake up start func
ReturnCode rfalWakeUpModeStart( const rfalWakeUpConfig *config )
{
/* Check if RFAL is not initialized */
if (gRFAL.state == RFAL_STATE_IDLE)
{
return ERR_WRONG_STATE;
}
if( config == NULL )
{
gRFAL.wum.cfg.period = RFAL_WUM_PERIOD_300MS;
gRFAL.wum.cfg.irqTout = false;
gRFAL.wum.cfg.swTagDetect = false;
gRFAL.wum.cfg.indAmp.enabled = true;
gRFAL.wum.cfg.indPha.enabled = false;
gRFAL.wum.cfg.cap.enabled = false;
gRFAL.wum.cfg.indAmp.delta = 8U;
gRFAL.wum.cfg.indAmp.reference = RFAL_WUM_REFERENCE_AUTO;
}
else
{
gRFAL.wum.cfg = *config;
}
/* Check for valid configuration */
if( gRFAL.wum.cfg.cap.enabled || gRFAL.wum.cfg.indPha.enabled || gRFAL.wum.cfg.swTagDetect || !gRFAL.wum.cfg.indAmp.enabled )
{
return ERR_PARAM;
}
if (gRFAL.wum.cfg.indAmp.reference == RFAL_WUM_REFERENCE_AUTO)
{
gRFAL.wum.cfg.indAmp.reference = gRFAL.wum.CalTagDet;
}
if ((gRFAL.wum.cfg.indAmp.delta > gRFAL.wum.cfg.indAmp.reference) || ((((uint32_t)gRFAL.wum.cfg.indAmp.delta) + ((uint32_t)gRFAL.wum.cfg.indAmp.reference)) > 0xFCUL))
{
return ERR_PARAM;
}
/* Use a fixed period of ~300 ms */
st25r95Idle(gRFAL.wum.cfg.indAmp.reference - gRFAL.wum.cfg.indAmp.delta, gRFAL.wum.cfg.indAmp.reference + gRFAL.wum.cfg.indAmp.delta, RFAL_ST25R95_IDLE_DEFAULT_WUPERIOD);
gRFAL.state = RFAL_STATE_WUM;
gRFAL.wum.state = RFAL_WUM_STATE_ENABLED;
return ERR_NONE;
}
RFAL_ST25R95_IDLE_DEFAULT_WUPERIOD = 0x0A.
Still am not able to reduce the wake up time. Could you please suggest if any correction is needed in the above function.
2023-09-28 12:10 AM
Hi,
As explained in one of my previous post about my findings, the wake-up mode is not used in your application (discParam.wakeupEnabled = false;) so rfalWakeUpModeStart is not used and your application does a continuous NFC polling.
As I've seen some ~50 ms delays in your trace, I would suggest to check the scheduling of your functions. Feel free to send me a new trace.
Rgds
BT