2020-04-10 11:15 AM
As the title suggests, I'm trying to implement on of the example applications that come with the cube expansion NFC5 for the NUCLEO-F303RE. The example application is called "Nucleo_PollingTagDetect".
Hardware setup:
-NUCLEO-F303RE
-X-NUCLEO-NFC505A1
What I've done so far:
-Started a new project and set it up using CUBEMX. I made sure to setup the SPI, LED pin and IRQ pins so they were routed to the correct Arduino headers (i can give specific set up if needed).
-edited Platform.h for my setup.
-included the Middleware packages "ndef" and "rfal".
-included the STR3911 drivers.
What works:
-The project gets to the demo loop of the sample application fine. I can push the blue, user button to toggle between "wake up mode on" and "wake up mode off".
What doesn't work:
-The RF field never seems to turn on and the reader never detects and tags I place near it.
-It seems like the function "rfalRunWakeUpModeWorker()" in "rfal_rfst25r911.c" should eventually set "gFRAL.wum.state" to "RFAL_WUM_STATE_ENABLED_WOKE". This never happens. "st25r3911GetInterrupt()" never returns any interrupts. It appears an interrupt must be present in order for "gFRAL.wum.state" to be set to "RFAL_WUM_STATE_ENABLED_WOKE. The program just loops, waiting for the interrupt to occur.
-While the program was looping, the same thing is being repeated on the SPI line. I attached this in the file "spi.xlsx". I couldn't figure out what the commands were doing from the datasheet. I'm pretty sure I have my SPI set up correctly, I don't think the program would get to the demo loop without it. (e.g. the demoini() function checks the chipID using a command over SPI and it returns a valid ID).
I attached my project too. I'm just branching out from the Arduino dev. boards, so I'm used to everything being overly simplified by libraries. Any hints on what to try would be greatly appreciated! Let me know if any additional information would help.
Thanks!
Solved! Go to Solution.
2020-04-13 03:27 PM
Hi,
make sure to call st25r3911Isr(); in EXTI0_IRQHandler() in stm32f3xx_it.c:
/**
* @brief This function handles EXTI line0 interrupt.
*/
void EXTI0_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_IRQn 0 */
/* USER CODE END EXTI0_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
/* USER CODE BEGIN EXTI0_IRQn 1 */
st25r3911Isr(); /* <-----------------ST25R3911 ISR needed here */
/* USER CODE END EXTI0_IRQn 1 */
}
Rgds
BT
2020-04-13 03:27 PM
Hi,
make sure to call st25r3911Isr(); in EXTI0_IRQHandler() in stm32f3xx_it.c:
/**
* @brief This function handles EXTI line0 interrupt.
*/
void EXTI0_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_IRQn 0 */
/* USER CODE END EXTI0_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_0);
/* USER CODE BEGIN EXTI0_IRQn 1 */
st25r3911Isr(); /* <-----------------ST25R3911 ISR needed here */
/* USER CODE END EXTI0_IRQn 1 */
}
Rgds
BT