2025-09-08 4:08 AM
Hello,
I am using STEVAL25R200 evaluation board and integrating read/write application using the ndef_read/write examples provided in the documentation embedded library. In my main function, I am Initializing the NFC using rfalNfcInitialize(), rfalNfcDeactivate() and rfalNfcDiscover().
In the while loop, using the rfalWorker() function, I am polling for NFC tags. I have checkd using the EVAL GUI software that a NFC V tag in indeed present and being detected along with its ID (e002080ab3e64bc8).
However, the tag is not detected in my code. I get the rfaNfcGetState = RFAL_NFC_STATE_POLL_TECHDETECT on my serial terminal and then it waits indefinitely. In my opinion, the activation of tag needs to happen using Interrupt routine but it never gets called and I never even proceed further. I have set my IRQ (PA0) and SS (PB0) pins in nfc_conf.h and initialized the IRQ pin as follows.
#define BUS_SPI1_NSS_GPIO_PIN GPIO_PIN_0
#define BUS_SPI1_NSS_GPIO_PORT GPIOB
#define BUS_SPI1_IRQ_GPIO_PIN GPIO_PIN_0
#define BUS_SPI1_IRQ_GPIO_PORT GPIOA
#define ST25R_SS_PIN BUS_SPI1_NSS_GPIO_PIN /*!< GPIO pin used for ST25R SPI SS */
#define ST25R_SS_PORT BUS_SPI1_NSS_GPIO_PORT /*!< GPIO port used for ST25R SPI SS port */
#define ST25R_INT_PIN BUS_SPI1_IRQ_GPIO_PIN /*!< GPIO pin used for ST25R IRQ */
#define ST25R_INT_PORT BUS_SPI1_IRQ_GPIO_PORT
________________________________________________
void platformIrqST25RPinInitialize(void)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
__HAL_RCC_GPIOA_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_0;
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
GPIO_InitStruct.Pull = GPIO_NOPULL;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
HAL_NVIC_SetPriority(EXTI0_1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI0_1_IRQn);
}
_____________________________________
Since the IRQ logs output once it surely is configured correct according to me. Please point out where I am going wrong that the interrupt never happens and tag doesn't get activated for reading it.
Thanks & Regards
2025-09-08 5:03 AM
Hi,
please enable ST25R_SELFTEST and see if your code still passes the initialization. Then if you still have issues, then please do a logic analyzer trace (SPI+IRQ) and post it here.
Please also be aware that the ISR as used by default in RFAL merely reads the interrupt status register. Follow-up work is to be performed by the rfalNfcWorker() and rfalWorker().
BR, Ulysses