cancel
Showing results for 
Search instead for 
Did you mean: 

Is the X-CUBE-NFC3 library what I should be using?

ADoug.1
Associate II

Hello,

I am currently working on a project with the CR95HF chip. The chip has to be controlled over UART (by a STM32L4S7ZITx) and I would like a library which provides basic functions, such as being able to read a presented tag's UID and be able to read from and write to the presented tag.

Does the X-CUBE-NFC3 library provide this functionality?

If so, how exactly do I integrate it into my existing STM32CubeIDE project? I am aware it cannot be added through STM32CubeMx so of the whole download provided at https://www.st.com/en/embedded-software/x-cube-nfc3.html#overview what part needs integrated into my project to get the functionality described above and how do I do this?

Thanks!

Amy

24 REPLIES 24
Brian TIDAL
ST Employee

Hi Amy,

see other topics related to Mifare classic: https://community.st.com/s/question/0D50X0000ADDjr7SQD/what-are-the-nak-value-meanings-for-cr95hf.

Such tags requires a proprietary authentication procedure before issuing any Read or write commands. Trying to send a Read command without having performed this mandatory step leads to receiving a NACK answer from the tag. Such tags are not Type 2 compliant and the proprietary authentication is not available from ST.

ndefPollerReadBytes/ndefPollerWriteBytes will work with Type 2/3/4/5 compliant tags. You can use them if you want to do basic read/write without having to cope with the type/technology dependent memory access.

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.

Hello,

Thank you, I will avoid MIFARE cards now then.

I have managed to get reading/writing working with the one demo card I have. Could you please advise if the ST25TA series NFC tags (https://www.st.com/content/st_com/en/products/nfc/st25-nfc-rfid-tags-readers/st25-nfc-rfid-tags/st25ta-series-nfc-tags.html#products) and ST25TV series NFC tags (https://www.st.com/content/st_com/en/products/nfc/st25-nfc-rfid-tags-readers/st25-nfc-rfid-tags/st25tv-series-nfc-tags.html#products) would all work with the CR95HF and the X-CUBE-NFC3 library?

If so, what tag would you advise for basic reading and writing? Ideally I would like a tag/card with the chip already integrated (not just an IC). Does ST provide such a product?

Thanks.

Amy

Brian TIDAL
ST Employee

Hi Amy

both ST25TA and ST25TV perfectly work with our ST25R95/CR95HF + X-CUBE-NFC3.

For basic read/write, I would personally use the ST25TV.

For you question regarding the tag ( Inlay+IC), I'll check internally.

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.
ADoug.1
Associate II

Hi Bruno,

Perfect, thank you and thank you for checking internally about available tags, etc.

Does the X-CUBE-NFC3 library come with any functions relating to putting the CR95HF into IDLE mode to be woken by tag detection? My hope is to have the chip in idle most the time and just have it wake when it senses an RFID tag. Therefore the ability to put it into this mode and have a function called when it does wake would be ideal but I can't see how this would be done.

Thanks.

Amy

Brian TIDAL
ST Employee

Hi Amy,

Tag Detection feature is supported in the X-CUBE-NFC3. This feature is available in the polling demo (demo.c) : when toggling the user button of the Nucleo board (blue button) the ST25R95/CR95HF enters or exits the tag detection mode. Once in tag detection mode, the device goes to polling when a tag is detected in the operating volume, reads the UID and returns in tag detection mode when the tag is removed. Tag detection feature is automatically managed as part of our RFAL High Layer interface in rfal_nfc.c: when the wakeupEnabled field of rfalNfcDiscoverParam structure is set to true, rfalNfcDiscover() will automatically enters in tag detection mode

Note: The tag detection feature requires calibration. This calibration is performed automatically at startup (make sure not to have a tag close to the antenna during the calibration).

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.