Skip to main content
Visitor II
March 2, 2021
Solved

SPI interface for STM32L476VG

  • March 2, 2021
  • 185 replies
  • 63548 views

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?

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    X-CUBE-NFC5 package provides an NFC polling demo using the RFAL and running on NUCLEO-L476RG (MCU board) + X-NUCLEO-NFC05A1 (ST25R3911B expansion board). It can be a good starting point for a project based on SYM32L476VG.

    Rgds

    BT

    185 replies

    RShiv.1Author
    Visitor II
    April 27, 2021

    Hi Ulysses,

    yeah I am not asking simulation for ST25R3911B  ..but for other application program for which I can write C program and simulate.

    let me know if this can be done

    regards

    Ravi

    RShiv.1Author
    Visitor II
    April 27, 2021

    Hi,

    since we are workking on STM32L476RG...for this do we have simulator so that we can write our application program??

    Technical Moderator
    April 27, 2021

    Hi,

    please check in STM32 support package / community.

    Regards, Ulysses

    RShiv.1Author
    Visitor II
    May 15, 2021

    Hi BT,

    As we were trying to get Disco board with STM32L476VG along with  X-NUCLEO-NFC05A1 board on the SPI + IRQ, we are not seeing SPI initialized..

    we integrated as we did previously..also PA5 ,PA6 ,PA7 are SPI1 pins..I am getting Platform log prints fine..Demoini is not working..kindly let me know what needs to be changed or checked.

    thanks and regards

    Ravi

    RShiv.1Author
    Visitor II
    May 15, 2021

    Hi BT,

    I had not selected the CS pin..made the changes..attached is the main.c file..I am still getting SPI init failed..Kindly let me know.

    thanks and regards

    Ravi

    RShiv.1Author
    Visitor II
    May 19, 2021

    Hi BT,

    In continuation with connecting NFC05A1 woth discovery board STM32L476VG and did all the integration of RFAL along with drivers.

    we exactly are stuck at the same point as previous where SPI is passing and it is going till ST_discovery

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

    after that RFAL activation is not working..even if we put print in rfalNfcaPollerCheckPresence in rfal_nfca.c we are not seeing the print.

    Any pointers as to where we need to do the change and get the RFID working...this is for ISO14443A

    Kindly help us out so that then we shall connect STM32L476RG and test the customized board.

    RShiv.1Author
    Visitor II
    May 19, 2021

    Hi BT,

    adding demo.c file

    Technical Moderator
    May 19, 2021

    Hi,

    the HAL_Delay(2000); in the while(1) in main.c:142 is probably the cause for your issue. This prevents from having real time processing. I would suggest to comment lines 140 to 142.

    I believe you are now close to fix your issue

    Rgds

    BT

    RShiv.1Author
    Visitor II
    May 20, 2021

    Hi BT,

    we tried even doing this..but no luck still not seeing any RFID value...neither we are seeing return code 4 also..we have put a print there in rfalNfcaPollerCheckPresence  function...do not understand from where to debug this...kindly let us know hoq to move on from here..

    thanks and regards

    Ravi

    Technical Moderator
    May 20, 2021

    Hi,

    I would suggest to check that the ST25R3911B interrupt pin from the X-NUCLEO-NFC05A1is properly connected to your custom board and that other existing connection to the IRQ_3911 GPIO does no conflict with the ST25R3911B interrupt pin.

    To investigate further, please connect a logic analyzer on the ST25R3911B IRQ pin + SPI pins (CLK, MOSI, MISO, CS) and provide a logic analyzer trace

    Rgds

    BT

    RShiv.1Author
    Visitor II
    May 20, 2021

    HI BT,

    Here we have connected  X-NUCLEO-NFC05A1 to discovery board STM32L476VG...we are trying with discovery there also same issue...we are trying to give you logs.

    thanks and regards

    Ravi