2024-12-16 07:32 PM
Hello,I have a question need your help!
About :MCU L431(80MHz),SPI 5M,IC ST25R3916. NFC06A1
I use "rfalNfcvPollerReadMultipleBlocks()" read two blocks at a time,but I found that it takes 9 ms to read successfully. How can I shorten this time?
2024-12-17 01:50 AM
Hi,
I think most of the time is consumed in the air:
NFCV typically works at 26kbps. The request to read is either 6 bytes or 14 bytes (if addressed mode is used). Then after ~300us the tag will answer: 2 blocks: 8 bytes + flags + CRC without security status: 11bytes.
So in case you are using addressed this would be 25bytes * 8 / 26 = ~8ms
You can try optimizing this by:
BR, Ulysses
2024-12-17 05:45 PM
Thank you very much for your reply.
The function I use is "err = rfalNfcvPollerReadMultipleBlocks(reqFlag, NULL, block_addr+i, 1, &rfid_data.buff[(modbus.rfid_block_size+2) * i], (modbus.rfid_block_size*2+3), &rcvLen);"
The tag I use can read up to 2 block at a time.The reqFlag is DEFAULT.And I directly set the read uid to null.So it takes 9ms to execute once.
According to your suggestion ,I added the selection mode before reading the data:
#if DEMO_NFCV_USE_SELECT_MODE
err = rfalNfcvPollerSelect( reqFlag, nfcDevice->dev.nfcv.InvRes.UID );
if( err == RFAL_ERR_NONE )
{
reqFlag = (RFAL_NFCV_REQ_FLAG_DEFAULT | RFAL_NFCV_REQ_FLAG_SELECT);
uid = NULL;
}
#endif /* DEMO_NFCV_USE_SELECT_MODE */
But,The time is longer now than before. Is there something wrong with my program?
And,I want to know how long it takes for ST25R3916 to discover NFCV.I'm 6ms now.
And,What is the shortest time to read two blocks (a block = 8 bytes) with this common tag?
Hope to get your reply.