Skip to main content
Visitor II
December 3, 2024
Solved

ST25R3916B self-tests fail

  • December 3, 2024
  • 1 reply
  • 1448 views

Hi

I'm trying to communicate from a STM32WB5MMG via a ST25R3916B to a ISO14443-A tag.

I use the X-CUBE-NFC6 RFAL library with ST25R3916B, RFAL_FEATURE_NFCA and RFAL_FEATURE_T2T set.

Both ST25R self-tests fail:

  • ST25R_SELFTEST returns RFAL_ERR_TIMEOUT
  • ST25R_SELFTEST_TIMER returns RFAL_ERR_SYSTEM (2nd)

Without self-tests, I can read the tag, but writing fails with RFAL_ERR_INCOMPLETE_BYTE.

Can you give me a hint?

Thanks, Daniel

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

    Hi,

    your ISR seems to never trigger, letting the code run into timeout. When the IRQ pin goes high  your ISR should kick in and read out the Interrupt status register (MOSI byte 0x5A + 4 more bytes. This never appears in your trace.

    The ST25R_SELFTEST is checking among others if the IRQ/ISR are correctly functioning and the timer porting also works.

     

    BR, Ulysses

    1 reply

    Technical Moderator
    December 3, 2024

    Hi,

    your ISR seems to never trigger, letting the code run into timeout. When the IRQ pin goes high  your ISR should kick in and read out the Interrupt status register (MOSI byte 0x5A + 4 more bytes. This never appears in your trace.

    The ST25R_SELFTEST is checking among others if the IRQ/ISR are correctly functioning and the timer porting also works.

     

    BR, Ulysses

    DaDuAuthor
    Visitor II
    December 3, 2024

    I forgot to tell that I'm using FreeRTOS …

    The RFAL initialization was called too early (while the scheduler was not started yet).

    After having moved the RFAL initialization, both self-tests pass. But writing to the tag still fails with RFAL_ERR_INCOMPLETE_BYTE.

    Can you give me a further hint?

    Thanks, Daniel

    Technical Moderator
    December 3, 2024

    Hi,

    not sure which function you are using for the writes. It seems you are trying to write page 0x23=35 on a T2T. I presume you anti-collided and activated the tag before?!

    With T2T many command responses only have 4 bits (no parity, no CRC). The RFAL signals in this case an incomplete byte error indicating 4 bits. You basically need to interpret the data despite the error. 

    In this case the tag was answering 0000b which may mean "invalid page address". Only an ACK (1010b) will indicate success.

    Ulysses