2019-03-19 05:36 AM
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:
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?
Solved! Go to Solution.
2019-05-16 06:39 AM
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.
2019-03-21 01:22 AM
Hi Martin,
can you provide a logic analyzer trace of this issue, please?
Regards, Ulysses
2019-05-16 06:39 AM
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.