cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3916 I want to improve the speed of reading block. How can I debug it?

hanzigg
Associate

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?

2 REPLIES 2
Ulysses HERNIOSUS
ST Employee

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:

  • Using rfalNfcvSelect() and using the select flag
  • Reading more blocks at once
  • Going towards ST25TV/DV and its fast mode where you can receive at 52kbps.

BR, Ulysses

hanzigg
Associate

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.

hanzigg_0-1734486168826.png

 

And,What is the shortest time to read two blocks (a block = 8 bytes) with this common tag?

Hope to get your reply.