2020-12-11 09:17 AM
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
Buy using the ST25R Antenna Matching Tool I get the following values for the custom board:
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.
Everything seems to be correct but why can't I detect any tag?
gaston
Solved! Go to Solution.
2020-12-17 05:58 AM
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
2020-12-17 06:56 AM
2020-12-17 08:01 AM
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
2020-12-17 10:33 AM
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.
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
2020-12-17 10:51 PM
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