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,

I was able to create a new project and now I know the changes to be made where I can build from scratch.The issue what I am facing like yesterday's problem where

undefined reference to `rfalNfcGetDevicesFound'

C:\Users\RAVI\Documents\STM\UART_I2C_SPI_test\Debug/../Core/Src/demo.c:161: undefined reference to `rfalNfcSelect'

Core/Src/demo.o: In function `demoIni':

I have included the path in main.c ..what is happening is the files in middleware folder is not getting reflected in the ac6 project..any idea how this can be included so that I can compile and come to the actual SPI problem..kindly let me know

regards

Ravi

Brian TIDAL
ST Employee

Hi,

#include files are searched from include paths. This is configured in your project settings. Right click on your project, open the project properties, go to C/C++ Build/Settings then Tool Settings and in MCUGCC Compiler select Includes and add the various includes from the reference demo. You should not have to hardcode the path in your #include in the source files .

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,

I have included the files from the actual path in the settings as you have mentioned..problemm here is the C files and .h files are not getting highlighted somehow in the project folder..how to include as part of ac6 ...if .h files are not included it would have given respective .h files not found..but here during compilation and linking stage not able to see the respective functions because c files are not compiled..no .o generated..more related to Ac6 compiler environment i guess.

regards

Ravi

RShiv.1
Senior

Hi BT,

Middleware files need to be compiled...I am not seeing during the build which means .0 files not getting created and hence not linking.

regards

Ravi

RShiv.1
Senior

Hi BT,

Makefile has not included middleware which means individual C files of rfal not compiled and is not able to link...thats the issue found..how do we add in the makefile??

manually or directly from ac6 compiler..just by adding middleware folder and refresh I thought it would take the files ...any other method??..let me know

rgds

Ravi

Brian TIDAL
ST Employee

Hi Ravi,

the makefile is autogenerated and should not be modified.

basically, you just need to drag the files from the Windows Explorer and drop to Ac6 System Workbench as explained in https://community.st.com/s/question/0D50X00009XkeidSAB/add-file-to-system-workbench-project.

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,

even he has done the refresh and it has worked for him..I did the same thing ..yesterday it worked for me in the other project..do not know why now it is not working.

rgds

Ravi

RShiv.1
Senior

Hi BT,

problem of including the file got solved...go to properties->c/c++ general->path and symbols->source location->add middleware folder

rgds

ravi

RShiv.1
Senior

Hi BT,

coming to actual SPI issue

Now I have configured the SPI to required prescaler value...also I have included the ST25Rwrite and doing the read..not able to see the value...also SPI is failing.

Kindly please suggest how to read the SPI read and write

regards

Ravi

RShiv.1
Senior

Hi BT,

also sharing the IOC file..let me know

rgds

Ravi