cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing ST25R3911B

MP.17
Associate II

Hi there, we want to use the ST25R3911B on our own board, so I've implemented the whole SPI communication in a Xilinx Zynq FPGA. So SPI communication is tested and working, so reading writing to registers is no problem.

Now I have to implement the RFID protocols, which are nicely provided by ST. So I've downloaded the software implementation from:

https://my.st.com/content/my_st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-nfc5.license=1552982656184.product=X-CUBE-NFC5.version=1.3.0.html

To save some wires (interrupt wires), instead of interrupts I do poll the interrupt registers on every function call "st25r3911CheckForReceivedInterrupts".

So running the main.c of this example, the process got stuck in a while code of the example:

static ReturnCode rfalTransceiveRunBlockingTx( void )

{

   ReturnCode ret;

// following while loop will never finishd:

   do{

       rfalWorker();

   }

   while( ((ret = rfalGetTransceiveStatus() ) == ERR_BUSY) && rfalIsTransceiveInTx() );

   if( rfalIsTransceiveInRx() )

   {

       return ERR_NONE;

   }

   return ret;

}

So by further debugging, I recognized that the problem seems to be in following function:

static void rfalTransceiveTx( void ){

[...]

       case RFAL_TXRX_STATE_TX_WAIT_TXE:

           irqs = st25r3911GetInterrupt( (ST25R3911_IRQ_MASK_FWL | ST25R3911_IRQ_MASK_TXE) );

           if( irqs == ST25R3911_IRQ_MASK_NONE )

           {

              // my interrupt is at the moment 0x82

              break; /* No interrupt to process */

           }

[...]

}

My problem is now, I am confused because there is no timeout or something to leave the loop. Also no new interrupts appear in this loop, even if i poll all interrupt registers with "st25r3911CheckForReceivedInterrupts()".

So perhaps someone had a similar problem when using this code in a non-ST-Evalboard?

Did I miss something?

1 ACCEPTED SOLUTION

Accepted Solutions
MP.17
Associate II

Sorry for the late answer, it was a little busy meantime.

Ok I figured out the problem: This code isn't working without interrupts. I wanted to avoid interrupts in my system, so we decided to use a separate STM32 to control this RFID module.

Thanks anyway.

View solution in original post

2 REPLIES 2
Ulysses HERNIOSUS
ST Employee

Hi Martin,

can you provide a logic analyzer trace of this issue, please?

Regards, Ulysses

MP.17
Associate II

Sorry for the late answer, it was a little busy meantime.

Ok I figured out the problem: This code isn't working without interrupts. I wanted to avoid interrupts in my system, so we decided to use a separate STM32 to control this RFID module.

Thanks anyway.