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,

These are finer oscillations as seen.

let me know whether we need to change anything from software side in calling any function.Kindly let me know where the problem could be.

If we keep demoini() function outsdie the loop then we are not seeing any oscillations...if antenna has any issue then we should not have seen anything when demoini is placed within the loop ..Kindly help us on this.

regards

Ravi

Brian TIDAL
ST Employee

Hi,

demoIni() ***shall*** be outside the while(1) loop.

Your problem seems to comes from the USER BUTTON which is always seen as low (thus the "Toggling wake up mode ON" message). Would you please comment out the Check if USER button is pressed code in the demo_cycle?

//    /*******************************************************************************/
//    /* Check if USER button is pressed */
//    if( platformGpioIsLow(PLATFORM_USER_BUTTON_PORT, PLATFORM_USER_BUTTON_PIN))
//    {
//        discParam.wakeupEnabled = !discParam.wakeupEnabled;    /* enable/disable wakeup */
//        state = DEMO_ST_START_DISCOVERY;                       /* restart loop          */
//        platformLog("Toggling Wake Up mode %s\r\n", discParam.wakeupEnabled ? "ON": "OFF");
 
//        /* Debounce button */
//        while( platformGpioIsLow(PLATFORM_USER_BUTTON_PORT, PLATFORM_USER_BUTTON_PIN) );
//    }

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 made the changes you have mentioned still not getting the RFID..

1.Demoini() is out of the while loop now

2.I have commented the portion you have mentioned but it is not going inside the if loop

if( rfalNfcIsDevActivated( rfalNfcGetState() ) )

      {

       platformLog("inside rfalNfcActivated\r\n");

        rfalNfcGetActiveDevice( &nfcDevice );

I have attached the demo.c ..kindly let me know

regards

Ravi

RShiv.1
Senior

Hi BT,

attached the main.c

RShiv.1
Senior

for my understanding I have put the platformLog("inside rfalNfcActivated\r\n"); print.

My expected print is

case RFAL_NFCA_***:

                platformLog("ISO14443A/Topaz (NFC-A ***) TAG found. UID: %s\r\n", hex2Str( nfcDevice->nfcid, nfcDevice->nfcidLen ) );

               

Kindly let me know if I am in right path

regards

Ravi

RShiv.1
Senior

Hi BT,

also now the oscillations are seen in the antenna side once when we connect to the scope...we are seeing this

Ravi

Brian TIDAL
ST Employee

Hi Ravi,

I had a look to your files.

In main.c, as already recommended in previous posts, please remove the test code (st25r3911WriteRegister and st25r3911CheckReg on ST25R3911_REG_BIT_RATE, lines 190 to 195) otherwise the value of this register would be unexpectedly modified between 2 demoCycle loops.

In demo.c, please uncomment lines 266 and 267. Your modification is preventing the polling loop to start. If you do not have leds, I would suggest to empty the definition of platformLedOff( port, pin )  and platformLedOn( port, pin ) inside plateform.h rather than commenting the code in demo.c

You are closer and closer.

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 made changes in main.c and also uncommented the lines 266 and 267...attached is demo.c

also I have changes the #define such that it is dummy 0 for all ,platformLedOff( port, pin ) ..but still not seeing any value .kindly let me know

RShiv.1
Senior

Hi BT,

attached is the main.h where the defines are pointed

Brian TIDAL
ST Employee

HI,

can you attach a logic analyzer on SPI(CLK, SS, MISO, MOSI) and ST253911_IRQ and provide a trace to me?

which tag do you use for your tests?

Thanks

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.