cancel
Showing results for 
Search instead for 
Did you mean: 

How ST25R3911B make a request by RFID?

GPaiv.1
Associate III

I'm using the demo code ST25R3911B-DISCO, and I don't find how are making the request for other board by RFID, I want to know if the code using interrupts to make this request each time gap or if this code makes a request just when calling a function?  

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi GPaiv.1,

in our software we typically use the ISR only to read the interrupt status register. All exchanges over NFC need to be triggered by calling functions. When using RFAL you need to make sure the rfalWorker()/rfalNfcWorker() are called often enough to let protocol advance (e.g. NFCDEP/ISODEP) and to assure in-time handling of ST25R3911B FIFO.

BR, Ulysses

View solution in original post

8 REPLIES 8
Ulysses HERNIOSUS
ST Employee

Hi GPaiv.1,

in our software we typically use the ISR only to read the interrupt status register. All exchanges over NFC need to be triggered by calling functions. When using RFAL you need to make sure the rfalWorker()/rfalNfcWorker() are called often enough to let protocol advance (e.g. NFCDEP/ISODEP) and to assure in-time handling of ST25R3911B FIFO.

BR, Ulysses

Hi Ulysses,

Is it possible to increase the speed of request RF?

Regards, Gabriel.

Hi Gabriel,

if you call RFAL often enough then you should be able to achieve a throughput somewhat close to the gross data rate (please expect some losses in the 10-30% range due to guard times, CRCs, parity bits, half-duplex protocol, etc.). I don't expect that you can achieve major speed-ups in the driver, also the gross data rate is most of the time fixed unless you can go to ISO14443-4 High Bit Rates, but this also needs to be supported by the tag in question.

In previous cases where throughput was an important target we typically needed to optimize other areas in the application first - e.g. USB communication class, logging, move to double buffering, etc.

Best Regards, Ulysses

Hi Ulysses, 

I'm using protocol ISO14443A, I would like to arrive at the frequency of 100k bits/s, but I just arriving in 44k bits/s.

I know then protocol ISO14443A has a max transmission rate of 106k bits/s.  

Can you had a suggestion for me, to increase the transmission rate?

That File is the demo code that I using.

Hi,

I couldn't locate the place in the file where you have implemented your application logic. But maybe better if you just describe the length of the commands and responses you send and the timing of the responses of the tag in use.

If this is about something T2T like then I am not surprised that you end up at 44kbps. Please remember it is a half-duplex protocol. After every 16bytes or so the reader needs to request the next 16 bytes. There are delays in between, parity and CRC on top, etc.

Regards, Ulysses.

Hi,

The communications with RFID chip is with SPI, right?

In the demo code, the function SPI "spi Init( parameter )" using as parameter "hspi1" this parameter is declared as "SPI_HandleTypeDef *hspi1". 

The print below shows the struct of "SPI_HandleTypeDef". I saw in the struct the DMA, if I will use DMA is It possible I will get a better transmission rate? 

Rgs, Gabriel.

 

Hi Gabriel,

better first analyze the system before starting optimizations here and there. I think that most likely you may not be too far away from the theoretical limit. But for judging on this you will need either observe the complete flow or you can also just calculate the theoretical limits. For this you will need to provide data on frame sizes, guard and delay times. I can help you here if you provide that data.

To our experience the SPI speed and throughput is not too far away to where it can get. As most of the transfers to ST25R3911B are registers reads and writes most of the time with only 2 byte frames I would expect that using DMA will actually slow down the system as the time to setup an SPI transfer using DMA is much longer than only filling the FIFO of the SPI block with 2 bytes.

Regards, Ulysses