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
RShiv.1
Senior

Hi BT,

yes we are testing with ST25R3911B-DISCO first and checking if all are fine..then we will mover to our custom board..we will change to PA0 and let you know.

we are having the same matching circuit as in disco board and also our custom board..anyways will test and let you know.

regards

Ravi

RShiv.1
Senior

Hi BT,

As we are using nucleo board NFC05A1 - and STM32L476VG ...we are wired from PA3 ..so anything PA0 or PA3 can be configured right and also

in main.h we have pointed IRQ pins as follows

#define IRQ_3911_Pin GPIO_PIN_3

#define IRQ_3911_GPIO_Port GPIOA

#define IRQ_3911_EXTI_IRQn EXTI3_IRQn

is this correct?..if we configure for PA3 then this becomes GPIO_PIN_3 and if PA0 GPIO_PIN_0...is this methodology correct??

I think we had configured this to pin 0 and EXTI0 ....let me know

regards

Ravi

RShiv.1
Senior

Hi BT,

Kindly look into main.h and let me know whether it is pointing to correct pin values.

regards

Ravi

RShiv.1
Senior

Hi BT,

Any suggestion from your side on the PA3 pins I had sent to you...we can use either PA3 or PA0 but ensure that we have configured for GPIO_EXTI3...our

concern is on the main.h file where I had sent you the pin configuration we have made..any changes there kindly let us know.

regards

Ravi

RShiv.1
Senior

Hi BT,

attached is the img of X-nucleo-NFC05A1 along with STM32L476G-disco board which we have connected .Here we have used PA3 and configured the same in stmcubeMX as said in our previous post.

RShiv.1
Senior

Hi BT,

configurations is as follows

PA4-SPI1_CS

PA5-SPI1_CLK

PA6-SPI1_MISO

PA7-SPI1_MOSI

PA3-IRQ_3911-GPIO_EXTI3

Now in main.h we have configured as follows

/* Private defines -----------------------------------------------------------*/

#define IRQ_3911_Pin GPIO_PIN_3

#define IRQ_3911_GPIO_Port GPIOA

#define IRQ_3911_EXTI_IRQn EXTI3_IRQn

#define SPI1_CS_Pin GPIO_PIN_4

#define SPI1_CS_GPIO_Port GPIOA

#define SPI1_CLKPULLUP_Pin GPIO_PIN_5

#define SPI1_CLKPULLUP_GPIO_Port GPIOA

#define SPI1_MISO_PULLUP_Pin GPIO_PIN_6

#define SPI1_MISO_PULLUP_GPIO_Port GPIOA

#define SPI1_MOSI_PULLUP_Pin GPIO_PIN_7

#define SPI1_MOSI_PULLUP_GPIO_Port GPIOA

I have attached the main.h also..kindly let us know if these are fine as configurations..so that we will know from where to debug

regards

Ravi

RShiv.1
Senior

Hi BT,

we are getting SPI succeeded but not the INT..attached is the main.c file also

RShiv.1
Senior

Hi BT,

any suggestion from your side to debug from here will be good..waiting for your reesponse..Kindly let us know.

Thanks and regards

Ravi

Brian TIDAL
ST Employee

Hi,

so you are ***not*** using ST25R3911B-DISCO but STM32L476G-DISCO.

On STM32L476G-DISCO, PA0, PA1, PA2, PA3 and PA5 are connected to the blue Joystick B2. This is probably conflicting with the ST25R3911B IRQ. Either modify the board (e.g. remove R52) or find an unused PIO.

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,

yes we are trying to get RFID working on STM32L476G-DISCO along with NFC05A1.

we have removed R52 ,R34 and R58 from the Disco board and have taken PA6 ,Pa7 connections from Seg 23 and Seg0 ..but still we are not seeing RFID val...also I have added return code(return code 4) as you had mentioned ..but I am not getting any print there...

Any pointers..

regards

Ravi