Skip to main content
Visitor II
November 6, 2019
Solved

X-CUBE-NFC6 example code

  • November 6, 2019
  • 2 replies
  • 1528 views

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"?

    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS

    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

    2 replies

    Technical Moderator
    November 7, 2019

    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

    RAvkhAuthor
    Visitor II
    December 15, 2019

    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?

    Technical Moderator
    December 17, 2019

    Hi,

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

    Regards, Ulysses

    RAvkhAuthor
    Visitor II
    November 7, 2019

    Hello!

    Thank you for your answer, i will try it.