cancel
Showing results for 
Search instead for 
Did you mean: 

SPI interface for STM32L476VG

RShiv.1
Senior

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?

190 REPLIES 190
Brian TIDAL
ST Employee

HI,

if the SPI is working properly, if you see proper responses from ST25R3911B on MISO, well, I would say it looks like either an HW issue (line being pulled up by another device) or the MCU GPIO is not properly configured (i.e. GPIO being in output pull up mode). Please provide a logic analyzer trace so I can check SPI communication is correct.

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
Senior

Hi BT,

Fine we will check this..but we do not have an analyser trace..we will share you the trace from scope(oscilloscope)..should be fine right.

regards

Ravi

Brian TIDAL
ST Employee

Hi,

1/ can you confirm you see the following log message:

  • "Initialization succeeded..\r\n"
  • "SPI init passed..\r\n"?

2/ disconnect the interrupt line from the ST25R3911B and connect the GPIO on 3V3 and then on Gnd: do you see the interrupt being triggered on MCU side?

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
Senior

Hi BT,

we are getting SPI

  • yes we are getting Initialization succeeded..\r\n"
  • "SPI init passed..\r\n"?

we will answer the 2nd one for you shortly.

regards

Ravi

RShiv.1
Senior

Hi BT,

we did the test for the 2nd point and still not seeing any result..I have also attached the ioc.file..can you confirm whether we need to configure PA3 as GPIO_EXTI3 or as GPIO_INPUT...let me know whether the configurations are correct..

regards

Ravi

RShiv.1
Senior

Hi BT,

also attaching the main.c file

RShiv.1
Senior

Hi BT,

since Interrupt is coming from ST25R3911 it must be GPIO_INPUT..is this correct??

regards

Ravi

Brian TIDAL
ST Employee

Hi,

as explained in previous posts, the PA3 GPIO connected to the interrupt line has to be configured as GPIO_EXTI3 external interrupt mode with rising edge trigger detection.

If the interrupt is not seen, I suggest to check the board with your HW engineer.

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
Senior

Hi Bt,

But we are using discovery board along with NFC05A1...even here the interrupt is not seen...then do you suggest this as hardware issue??.

regards

ravi

Brian TIDAL
ST Employee

Hi, You mean you are using the ST25R3911B-DISCO and have connected the SPI + IRQ from X-NUCLEO-NFC05A1 on P204 points and have isolated the onboard ST25R3911B?

Well, in that case, the IRQ pin is connected to PA0 EXTI0 (see schematicshttps://www.st.com/content/ccc/resource/technical/layouts_and_diagrams/schematic_pack/group0/71/e3/fd/6c/0c/db/42/21/Schematics-ST25R3911B-DISCO-MB1325/files/Schematics-ST25R3911B-DISCO-MB1325.PDF/jcr:content/translations/en.Schematics-ST25R3911B-DISCO-MB1325.PDF).

So if using the the ST25R3911B-DISCO, you have to modify you SW to use PA0 instead of PA3.

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.