2018-05-02 10:09 AM
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 #inventory16slotSolved! Go to Solution.
2018-05-04 05:47 AM
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 (
)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
2018-05-04 05:47 AM
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 (
)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
2018-05-04 10:30 AM
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
2018-05-16 07:21 PM
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
forSTM32F401RE-Nucleo
and X-NUCLEO-NFC0A1 boards =>> code is STM32CubeExpansion_NFC5_V1.2.0I ported the code to our target CPU and board, and got it to work correctly.
Thanks!
Gil
2018-05-17 06:17 PM
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