2023-10-16 05:58 AM
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
Solved! Go to Solution.
2023-10-18 06:18 AM
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
2023-10-18 06:50 AM
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
2023-10-18 07:05 AM
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
2023-10-18 11:43 PM
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
2023-10-19 12:41 AM
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
2023-10-19 12:44 AM
Hi,
thanks to your help everything is working fine.
Rgds