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,

let me know where PA4 initialization is to be seen...for me it is in cubeMx ..LET me know

Brian TIDAL
ST Employee

Hi Ravi,

in RFAL, the SPI SS is managed by software. Therefore, the configuration has to be  hspi1.Init.NSS = SPI_NSS_SOFT and PA4 has to be configured in STM32CubeMX as GPIO_Output in the Pinout view and Output Push-Pull, No pull up and no pull down, level Low, speed Low in SystemCore->GPIO.

Basically, you just need to replicate the configuration that I've sent to you in X-NUCLEO-NFC05A1.ioc.

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,

Now configured as GPIO_output and I am seeing PA4 initialization but still not seeing any values.

My spireadregister syntax looks fine right ..kindly let me know

regards

Ravi

Brian TIDAL
ST Employee

Hi,

the SW configuration seems ok. By the way, I believe platformLog should also work.

It's time now to check the HW.

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,

attaching my IOC file ..let me know

RShiv.1
Senior

Hi BT,

for platform log

#define platformLog(...)               logUsart(__VA_ARGS__)    

I need to use USE_LOGGER ..I have added the define ...I need to use LOGGER_ON I guess.

--Ravi

RShiv.1
Senior

Hi BT,

we are checking from H/W side..as we have done evrything from S/W I guess

Hi,

yes, as explained in one of the first answers:

  • add the proper defines (USE_HAL_DRIVER,STM32L476xx,USE_LOGGER,ST25R3911) in your configuration.

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,

once I initialized LOGGER_ON..I am seeing platformLog("Initialization failed..\r\n"); message in UART..that means RFAL initlaize has not happened I guess.

let me know if I need to do anything more

regards

Ravi

RShiv.1
Senior

Hi BT,

I think the I found the issue let me know where to change the configuarations

  1. when demoINI is called rfalNfcInitialize () is called but in ac6 when ctrl _click is done to navigate the code this is not going to rfal_nfc.c file instead going to rfal_nfc.h
  2. In rfalNfcInitialize , rfalAnalogConfigInitialize() func is called and I could not navigate to rfalAnalogConfigInitialize using ac6
  3. here I am seeing unreolved symbols rfalAnalogConfigDefaultSettings,rfalAnalogConfigDefaultSettings

seems like the .C and linking issue in ac6..I have added the folder from pathand symbols as done yesterday...

where do we now need to change to that RFAL is initialized and get the message

I think we need to resolve this before going to democycle or even SPIWRite ,SPIread I guess

Kindly let me know

regards

Ravi