Skip to main content
Visitor II
November 14, 2024
Solved

Issue detecting card, ST25R3916B, with RFAL STSW-ST25RFAL002, FreeRTOS Polling

  • November 14, 2024
  • 1 reply
  • 5195 views

Hello!

I am working on integrating ST25R3916B into our product based on PSOC 6 CM4.  I can read the ID and initialization seems to succeed but I cannot detect any tags.

Setup:
* I am using STEVAL-ST25R3916B reader expansion board with ST25R3916B.

* I have VBUS connected 5V, 3.3v to 3v3. SPI pins are properly connected and can read the ID. IRQ as +ve edge.

* I have attached spi transaction logs, I have the SPI bus connected to the logic analyzer in case if need any transaction through the logic analyzer.

* I have attached rfal_platform.h and have ST25R_COM_SINGLETXRX enabled and spi_transfer handles the SS pin.

Please let me know anything to try, not sure where to start.

    This topic has been closed for replies.
    Best answer by Ulysses HERNIOSUS

    Hi,

     

    25MHz will not be possible with ST25R3916B. Please check the DS. Fortunately in your trace the SPI is rather at 1.6MHz.

    Looking at the trace I find the IRQ pin staying high typically for ~6ms before getting cleared. The timeout handling is happening around <2ms but ISR seems to kick in only after 6ms.

    Changing the timeouts is exactly just covering the underlying problems. The values should be fixed and are done in a way that they should pass if proper timer abstraction and interrupt handling is in place.

    Regards, Ulysses

    1 reply

    Technical Moderator
    November 14, 2024

    Hi,

    to me it seems the ISR is not handled properly. The software is sending C8 command to turn on the field but ISR is not hitting and no read-out of Interrupt status registers (5A) happens. Then function st25r3916PerformCollisionAvoidance() returns an error and upper layer think field could not get turned on.

    I propose to employ ST25R_SELFTEST and see to get basic platform functions operational.

     

    BR, Ulysses

    Visitor II
    November 14, 2024

    Hi @Ulysses HERNIOSUS 
    Thanks for the quick reply, 
    I have enabled the self test and it does fail. Attached the transactions and don't see the interrupt.

    I have the GPIO interrupt initialized and enabled for positive edge properly and works if I simulate the GPIO pin. But don't see the interrupt from STEVAL-ST25R3916B reader expansion board.


    We have the external pullup on this IRQ GPIO, I have it initialized as pulldown, but goes high as soon as it is connected to ST25R3916B and goes and stays low for the entire initialization.

    Do you see any issue with this pullup? What should be the GPIO configuration for this IRQ?

    InitFailureSPITransactions.png

    Pullups.png

    IrqTestSimulatedZoomed.png

    IrqTestSimulated.png




    Technical Moderator
    November 15, 2024

    Hi,

     

    having an external pull-up + internal pull-down is for sure not optimal. Also the digital Saleae traces will not show you the truth here. IRQ should only have a pull-down. ST25R3916B will drive it to VDD as long as interrupt condition persists. 

    Typically the IRQ pin is only for very short whiles (tens of us) high before the ISR kicks in, reads the interrupt status and thus clears the line again. 

    Having long high times on IRQ is an indication of issues - most likely in SW.

     

    BR, Ulysses

    Technical Moderator
    November 18, 2024

    Hi,

    csv is not easily readable for me. You can attach .sal when packaged into a .7z or .tar I think.

    BR, Ulysses

    Visitor II
    November 18, 2024

    And, my SPI runs at 25MHz. I have other peripherals on the bus.

    Technical Moderator
    November 18, 2024

    Hi,

     

    25MHz will not be possible with ST25R3916B. Please check the DS. Fortunately in your trace the SPI is rather at 1.6MHz.

    Looking at the trace I find the IRQ pin staying high typically for ~6ms before getting cleared. The timeout handling is happening around <2ms but ISR seems to kick in only after 6ms.

    Changing the timeouts is exactly just covering the underlying problems. The values should be fixed and are done in a way that they should pass if proper timer abstraction and interrupt handling is in place.

    Regards, Ulysses