Skip to main content
RShiv.1
Associate III
March 2, 2021
Solved

SPI interface for STM32L476VG

STM32L476VG is the MCU we are interfacing with ST25R3911B using SPI.

what we have understood from some search is that we need RFAL (abstraction layer) to interface with RF HAL.

Then once we integrate RFAL and RF HAL in our system workbench(ac6) project we need to build the integration then use SPI calls to read the register from RFID reader ST25R3911B

we wanted to use ISO-14443A standard to be configured and read the values.

where do we get the basic RFAL work space or code flow so that we shall use in our current project?

Kindly guide us and let us know are we in right path?

This topic has been closed for replies.
Brian TIDAL
Brian TIDALBest answer
ST Technical Moderator
March 2, 2021

Hi,

X-CUBE-NFC5 package provides an NFC polling demo using the RFAL and running on NUCLEO-L476RG (MCU board) + X-NUCLEO-NFC05A1 (ST25R3911B expansion board). It can be a good starting point for a project based on SYM32L476VG.

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.

190 replies

RShiv.1
RShiv.1Author
Associate III
May 21, 2021

Hi BT,

R200 is properly soldered and we have checked resistance from CN8.Pin1 to 3911 pin...and it is 220 ohm from CN8pin1 to 3911 pin..

we are not seeing any signal on either side of R200..any observation from here let us know

regards

Ravi

Brian TIDAL
ST Technical Moderator
May 21, 2021

Hi,

does the crystal start to oscillate during initialization? (probe XTI/XTO while reseting the MCU)

Can you try with another X-NUCLEO-NFC05A1?

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.
RShiv.1
RShiv.1Author
Associate III
May 21, 2021

Hi BT,

crystal is not oscillating ...we are not seeing any oscillation....we will change this and try..we will try to fecth another XnucleoNFC-05A1..keep you posted.

Thanks for all your support.

regards

Ravi

RShiv.1
RShiv.1Author
Associate III
May 25, 2021

Hi BT,

In continuation with our effort to get the crystal we have following crystal

  1. can we 13.56 Mhz crystal ,If so what changes need to be done on the STM cube or code..currently we are having only 13.56 Mhz crystal instead of 27.12 Mhz
  2. any changes in Cube Mx or code kindly let us know

Thanks and regards

Ravi

RShiv.1
RShiv.1Author
Associate III
May 25, 2021

Hi BT,

we are trying to use/put 13.56 Mhz crytal for X-NUCLEO-NFC05A1 board to get the Interrput working..Kindly let us know.

regards

Ravi

RShiv.1
RShiv.1Author
Associate III
May 25, 2021

Hi BT,

waiting for your reply..kindly let us know how to proceed from here..

regards

Ravi

Brian TIDAL
ST Technical Moderator
May 25, 2021

Hi Ravi,

do you mean your X-NUCLEO-NFC05A1 has no crystal? i.e. someone has unsoldered the exiting crystal on this board?

For your information, the X-NUCLEO-NFC05A1 comes with XRCGB27M120F3M00R0 27.1200MHz crystal.

The oscillator can operate with 13.56 MHz and 27.12 MHz crystals. Use of 27.12 MHz crystal is recommended for better performance.

From firmware point of view, IO configuration register 1 (00h) bit 3 has to be configured in accordance with 13.56 or 27.12 MHz crystal. This is done in st25r3911Initialize : replace   st25r3911WriteRegister(ST25R3911_REG_IO_CONF1, ST25R3911_REG_IO_CONF1_osc); with   st25r3911WriteRegister(ST25R3911_REG_IO_CONF1, 0x00);

Anyway, I would strongly suggest to use a genuine/unmodified X-NUCLEO-NFC05A1 with its original crystal.

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.
RShiv.1
RShiv.1Author
Associate III
May 25, 2021

Hi BT,

thanks for your reply.As per previous post there was no activity seen from the crystal side...we were not getting any INterrupt because crystal not working.

so we thoght of changing the crystal and we only have 13.56 Mhz now to check...we have paralley ordered new NFC to check...we wil make the changes are

revert for any thing required

regards

Ravi

RShiv.1
RShiv.1Author
Associate III
May 25, 2021

Hi BT,

The configuration you mentioned and what we have in the file is different ..kindly let us know whether in the file and in the function st25r3911Initialize()

is configured for what frequency crystal...

 st25r3911WriteRegister(ST25R3911_REG_IO_CONF1, 0x00); already present in st25R3911 for 13.56 Mhz

kindly let me know whether we need to change the configuration for 27.12?? if so I think we need to add

st25r3911WriteRegister(ST25R3911_REG_OP_CONTROL, ST25R3911_REG_IO_CONF1_osc); this I guess..let me know

Thanks and regards

Ravi

Brian TIDAL
ST Technical Moderator
May 25, 2021

Hi,

X-NUCLEO-NFC05A1 is supposed to be functional when shipped from the board manufacturer. I would suggest to check the soldering of the existing 27.12 crystal.

Also, can you add the following code at the end of st25r3911OscOn():

/* Double check that OSC_OK signal is set */
 if( !st25r3911CheckReg( ST25R3911_REG_AUX_DISPLAY, ST25R3911_REG_AUX_DISPLAY_osc_ok, ST25R3911_REG_AUX_DISPLAY_osc_ok ) )
 {
 plateformLog("Osc not running\r\n");
 }

Regarding st25r3911WriteRegister(ST25R3911_REG_IO_CONF1, 0x00); you probably mix with st25r3911WriteRegister(ST25R3911_REG_OP_CONTROL, 0x00);

Anyway, in this version of code, as the default reset value for ST25R3911_REG_IO_CONF1 is osc=27.12MHz, it is not explicitly set. If you really want to try a 13.56MHz crystal, you'll have to add st25r3911WriteRegister(ST25R3911_REG_IO_CONF1, 0x00); after the SET_DEFAULT command (st25r311.c line 125)

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.