cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-NFC6 example code

RAvkh
Associate III

Hello!

In X-CUBE-NFC6 manual https://www.st.com/content/ccc/resource/technical/document/user_manual/group1/16/85/63/86/35/64/42/47/DM00635198/files/DM00635198.pdf/jcr:content/translations/en.DM00635198.pdf

i can see:

"2.1 Overview

The X-CUBE-NFC6 software package expands the STM32Cube functionality.

The package key features are:

• Sample application to detect NFC tags of different types and mobile phones supporting P2P, card emulation mode and read/write"

But in package i can't find this example. I can find only "WriteURI" example.

Where i can get "Sample application to detect NFC tags"?

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi,

the package should have all that in e.g.

STM32CubeExpansion_NFC6_V1.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect\Src\demo.c, ndef_demo.c

Project e.g. in STM32CubeExpansion_NFC6_V1.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect\MDK-ARM

Regards, Ulysses

View solution in original post

5 REPLIES 5
Ulysses HERNIOSUS
ST Employee

Hi,

the package should have all that in e.g.

STM32CubeExpansion_NFC6_V1.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect\Src\demo.c, ndef_demo.c

Project e.g. in STM32CubeExpansion_NFC6_V1.0.0\Projects\STM32L476RG-Nucleo\Applications\PollingTagDetect\MDK-ARM

Regards, Ulysses

RAvkh
Associate III

Hello!

Thank you for your answer, i will try it.

I'm successfully implement my own EMV-kernel (Visa+Mastercard) using this example as a starting point. All works fine, thank you.

Now i need to change PINs, used for SPI communication with ST25R3916 (to upload program to my custom board):

NSS - PB0

IRQ - PC5

To do this, i made changes in spi.h:

#define BUS_SPI1_NSS_GPIO_PIN     GPIO_PIN_0

#define BUS_SPI1_IRQ_GPIO_PIN     GPIO_PIN_5

#define BUS_SPI1_IRQ_GPIO_PORT     GPIOC

#define BUS_SPI1_IRQ_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()

But example stops working after this changes. Sometimes i can read ChipID register (0x2A), but nothing else.

I've made experiments on X-NUCLEO-NFC06A1 board.

What else i need to change in code to correctly change pins, used for spi communication?

Hi,

please provide logic analyzer traces of the issue to be able to inspect.

Regards, Ulysses

RAvkh
Associate III

Hello!

Problem was in code, that automatically been generated by Cube. Fixed.