cancel
Showing results for 
Search instead for 
Did you mean: 

st25r3911b sequence to see tag

Guilherme dePaula
Associate II
Posted on May 02, 2018 at 19:09

Hi all,

I use a dsPIC33 MCU, but I am very familiar with the STM32 as well, so I used the ST25R Dicovery source code as an example.  

The design is a PIC MCU and the ST25R3911B, (with our antenna circuitry following ST design suggestions).  I have the SPI port communication working well, and I can read/write to the ST25R registers from the MCU.

1. I currently call the initialization at power up (rfalAnalogConfigInitialize() and rfalInitialize()), with gets completed without errors.

2. I now need to know what is the sequence of commands needed to talk to a tag.  We can talk to the tag (read/write) from the

ST25R Dicovery 

PC GUI without problems, but I am not sure which commands need to be sent to achieve that in the embedded code, because I don't know the exact sequence of commands needed.  Here's what I do when I want to discover a tag placed on the antenna:

a. I call iso15693Initialize() ... no error. (trying to imitate the 'Configuration' button click on the PC GUI)

b. I call rfalFieldOnAndStartGT() ... no error.  Do I need this????

c. And trying to imitate the 'Inventory' button click on the PC GUI, I call iso15693Inventory() ... but the code gets stuck in rfalTransceiveRunBlockingTx() in this statement: while( ((ret = rfalGetTransceiveStatus() ) == ERR_BUSY) && rfalIsTransceiveInTx() ); ... it's forever waiting at RFAL_TXRX_STATE_TX_WAIT_GT state.

Also, I have rfalWorker() in my main loop in main.c

Am I missing a command in my sequence?

Or maybe, does it mean it needs the tag closer?  Is the antenna not turned on? Is it potentially a hardware problem with our antenna circuitry?

After that is achieved, I realize I still have to try to imitate 'Get System Information', 'iso15693ReadBlock' for reading blocks, 'iso15693WriteBlock', etc, etc

But am I missing anything so far just to initialize the device and then get an 'Inventory'? (before calling iso15693Inventory())

Thanks,

Gil

#iso15693 #st25r3911b-disco #st25r3911b #inventory16slot
1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee
Posted on May 04, 2018 at 14:47

Hi Gil,

iso15693 layer is a convenience layer (and glue layer for the GUI) using the RFAL. So you don't need both layers. For usage of the rfal layer only you could have a look at the XNUCLEO-NFC05A software (

http://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/x-cube-nfc5.html

 )

Having it forever hanging in that loop hints on a problem on Interrupt service routine. Is it the right pin, is it high or low?

Regards, Ulysses

View solution in original post

4 REPLIES 4
Ulysses HERNIOSUS
ST Employee
Posted on May 04, 2018 at 14:47

Hi Gil,

iso15693 layer is a convenience layer (and glue layer for the GUI) using the RFAL. So you don't need both layers. For usage of the rfal layer only you could have a look at the XNUCLEO-NFC05A software (

http://www.st.com/content/st_com/en/products/embedded-software/st25-nfc-rfid-software/x-cube-nfc5.html

 )

Having it forever hanging in that loop hints on a problem on Interrupt service routine. Is it the right pin, is it high or low?

Regards, Ulysses

Posted on May 04, 2018 at 17:30

Hi Ulysses,

Great feedback!

1. I will try to use just one layer (RFAL) and check out the suggested software, instead of the one I used as example.

2. I will double-check the interrupt line pin and level/edge configurations, and if the ISR is called, etc.

Thanks!

Cheers,

Gil

Posted on May 17, 2018 at 02:21

Hi Ulysses,

Problem solved.

I checked the INT line and ISR and everything was OK.

So I followed your other suggestion and g

ot the example

application

for

STM32F401RE-Nucleo

 and X-NUCLEO-NFC0A1 boards =>>  code is STM32CubeExpansion_NFC5_V1.2.0

I ported the code to our target CPU and board, and got it to work correctly.

Thanks!

Gil

Posted on May 18, 2018 at 01:17

Hi Ulysses,

I have posted a new question about read/write problems, after the successful inventory/get ID is done.

It's here:

https://community.st.com/0D50X00009XkWNXSA3

 

Thaks,

Gil