cancel
Showing results for 
Search instead for 
Did you mean: 

cannot detect any tag on ST25R3916

Gaston
Senior

Hi,

I have made a custom design for reading/writing NTAG213 tags based on the X-NUCLEO-NFC06A1 board. I have adapted the firmware that works on this demo board (along with all the drivers related to the ST25R3916 and RFAL) into a STM32G030K8T6 microcontroller.

I have neither capacitive sensing nor AAT implemented in Hardware and I have also disabled these mechanisms in the Firmware according to this post.

The antenna design is very similar to the ST25R3916 Discovery Board (2 turns, 65mm x 85 mm). For the the antenna analysis I have measured its real parameters following the indications of the AN5276 Application Note:

This is LANT = 1.03 uH RSDC = 440m Ohms fres = 60.19 MHz Rp @ fres = 7.29 Kohms

0693W000006FVXtQAO.png 

Buy using the ST25R Antenna Matching Tool I get the following values for the custom board:

0693W000006FVQdQAO.png 

On the Firmware side the Initialization is successful (ERR_NONE)... but does not detect any tag during execution of the detection cycle routines.

I have checked the presence of any signal near the antenna by means of a small loop made with the oscilloscope probe. I see that the antenna is actually emitting at 13.56MHz every second.

0693W000006FVXFQA4.bmp 

Everything seems to be correct but why can't I detect any tag?

gaston

14 REPLIES 14

Hi Gaston,

could you share the .logicdata files instead? They would be so much more readable than pure SPI dumps - containing also IRQ and SS signal.

BR, Ulysses

Hi Ulysses,

Yes, no problem.

regards,

gaston

Hi Gaston,

your interrupt service routine is not operating. There are only two instances of reading Interrupt status register (MOSI: 0x5A) which are actually not caused by the line being high. I assume your ISR triggers on a different pin somehow.

Regards, Ulysses

Hi Ulysses,

Well, the ISR works as expected but thanks to your suggestion I've realized that the callback is never called!...and st25r3916Isr() function never executed.

Digging into it I see the ISR callback implementation in G0 family is quite different from L0 and L5 what have I used to do the porting.

I have finally been able to fix it by modifying the stm32g0xx_hal_gpio.c file but this is not supposed to be done.

0693W000006GChIQAW.png 

How can I get the same functionality without modifying the HAL file?

I've also seen another post about this but no ST employee has answered and I would like to know your opinion.

regards,

gaston

Hi Gaston,

I think you can just implement your own function e.g. in your main.c:

void HAL_GPIO_EXTI_RisingCallback(uint16_t /*GPIO_Pin)
{
   st25r3916Isr();
}

Because of the __weak used in stm32g0xx_hal_gpio.c your version of the function will be used as opposed to the default one.

Ulysses