cancel
Showing results for 
Search instead for 
Did you mean: 

R/W a Tag using ST25R3916

CT-55555
Senior

Hello everyone, 

I want to Read / Write a Tag using the X-Nucleo - NFC08A1. The demo project(polling) runs perfectly. I also installed X-Cube-NFC6. Which rfal libary is the best and how do I implement the function in the main.c.

 

Tnak you for helping

15 REPLIES 15
Brian TIDAL
ST Employee

Hi,

basically, the demo provides an almost turnkey solution: after some initialization, the main() loops on MX_X_CUBE_NFC6_Process() that does the job to detect a tag and reads its unique ID. Then, when a type V tag has been discovered, the demoCycle calls demoNfcv where the user can add its own code  for his application.

demoNfcv provides a example of reading the block #1 of a type 5 tag with the function rfalNfcvPollerReadSingleBlock. You just need to modify the code in demoNfcv to read the various blocks required by your application with rfalNfcvPollerReadSingleBlock

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
CT-55555
Senior

Hi Brian, 

I found my mistake and I realise how stupid it was thank you for you're patience. Now I just need to see the messages from plaformLog(). It uses Usart am I right ? So therefore you just need a terminal to read the COM-Port or is there something I am missing ? 

 

Rgds 

Hi,

by default, platformLog() uses an UART/USART serial interface bridged by the ST-Link to an USB Virtual Com Port (VCP). So you just need a serial terminal on your PC connected to this VCP.  The platformLog() function-like macro can be easily customized to use your own log mechanism. 

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi, 

I'm using USART1 on the STM32F205VET6( PA10 - RX, PA9 - TX). I also use a USB interface converter and connected RX(STM32) with TX(Converter) and TX(STM32) with RX(Converter) and dont receive any messanges on the terminal. 

Rgds

Hi,

make sure TX and RX are not swapped, make sure GND is properly connected to the converter, make sure USART1 is properly initialized (MX_USART1_UART_Init), just after the initialization call  HAL_UART_Transmit with a test buffer and check that the data are present on the TX pin (make sure to probe both TX an RX), make sure the USB converter is designed for 3.3V signals.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hi, 

thanks to your help everything is working fine. 

Rgds