Solved
ST25R3911 Long time to read tag
I want to trigger a RFID reading at certain intervals using ST25R3911 and from this I want a RFID reading to be done within 1 second.
When I try this in RFAL (using democode for polling):
err = rfalNfcDiscover( &discParam );
if( err != RFAL_ERR_NONE )
{
printf("Err %d!\n\r", (int)err);
return false;
}
state = DEMO_ST_START_DISCOVERY;
It takes about 10 second to do a RFID reading which is way too long.
When analyzing what RFAL is doing this is what I see when checking gNfcDev.state in rfalNfcWorker:
void rfalNfcWorker( void )
{
ReturnCode err;
rfalWorker(); /* Execute RFAL process */
printf("State %d\n\r", (int)gNfcDev.state);
switch( gNfcDev.state )
{
RFAL_NFC_STATE_POLL_TECHDETECT - about 5 seconds
RFAL_NFC_STATE_POLL_COLAVOIDANCE - about 4 seconds
Which is obvisously too long for a user to hold an RFID card in front of the reader. What is RFAL doing and how can I reduce time from request reading to reading done within 1 second? I see several timers are created in state 10 = RFAL_NFC_STATE_POLL_TECHDETECT
.State 10
Timer 30 ms
.State 10
Timer 1154 ms
#Timer# 154 ms
.State 10
Timer 30 ms
.State 10
Timer 5 ms
.State 10
Timer 1000 ms
T#imer 1 ms
.Timer 1001 ms
Stat#e 10
#.State 10
.State 10
Timer 30 ms
.State 10
Timer 1154 ms
#Timer# 154 ms
.State 10
Timer 30 ms
.State 10
Timer 5 ms
.State 10
Timer 1000 ms
T#imer 1 ms
.Timer 1001 ms
Stat#e 10
#.State 10
.State 10
And in state 11 = RFAL_NFC_STATE_POLL_COLAVOIDANCE several timers of 1000 ms are created:
.State 11
Timer 5 ms
.State 11
Timer 1000 ms
T#imer 1 ms
.State 11
Timer 1000 ms
##.State 11
.State 11
.State 11
.State 11
Timer 1000 ms
#.State 11
.State 11
.State 11
.State 11
Timer 1000 ms
##.State 11
.State 11
.State 11
.State 11
Timer 1000 ms
#.State 11
Timer 5 ms
.State 11
Timer 1000 ms
T#imer 1 ms
.State 11
Timer 1000 ms
##.State 11
.State 11
.State 11
.State 11
Timer 1000 ms
#.State 11
.State 11
.State 11
.State 11
Timer 1000 ms
##.State 11
.State 11
.State 11
.State 11
Timer 1000 ms
#.State 11
