cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3916B CRC Error

AugustoZ
Associate

Hi!

I'm using a x-nucleo-nfc08a1 board on a nucleo-g491re using mbed os, I'm trying to implement support for a tag which requires custom crc and parity on both tx and rx.

I'm using the following flags

RFAL_TXRX_FLAGS_CRC_TX_MANUAL | RFAL_TXRX_FLAGS_CRC_RX_KEEP | RFAL_TXRX_FLAGS_PAR_RX_KEEP | RFAL_TXRX_FLAGS_PAR_TX_NONE | RFAL_TXRX_FLAGS_CRC_RX_MANUAL

with rfalStartTransceive, tx works fine but rx fails with a crc error (rfalNfcDataExchangeGetStatus() returns RFAL_ERR_CRC.

rxRcvdLen gets set to 8192 and rxBuf is filled with 0s.

I'm using a proxmark3 to debug the nfc communication and the tag responds fine as expected, but RFAL (or the transceiver itself) drops the packet.

1 ACCEPTED SOLUTION

Accepted Solutions
Ulysses HERNIOSUS
ST Employee

Hi AugustoZ,

I find some code where we are using the following flags to exchange such frames:

 ctx.flags = RFAL_TXRX_FLAGS_CRC_TX_MANUAL | RFAL_TXRX_FLAGS_CRC_RX_KEEP | RFAL_TXRX_FLAGS_CRC_RX_MANUAL | RFAL_TXRX_FLAGS_NFCIP1_OFF | RFAL_TXRX_FLAGS_AGC_ON | RFAL_TXRX_FLAGS_PAR_RX_KEEP | RFAL_TXRX_FLAGS_PAR_TX_NONE;

Very similar to yours but looking at your description I find rfalStartTransceive (low level) mixed with rfalNfcDataExchangeGetStatus(higher level). The rfalNfc layer only supports byte oriented frames - did you hack into this layer?

Also the rxRcvdLen being set to 8192 shouldn't happen...

Best Regards, Ulysses

View solution in original post

2 REPLIES 2
Ulysses HERNIOSUS
ST Employee

Hi AugustoZ,

I find some code where we are using the following flags to exchange such frames:

 ctx.flags = RFAL_TXRX_FLAGS_CRC_TX_MANUAL | RFAL_TXRX_FLAGS_CRC_RX_KEEP | RFAL_TXRX_FLAGS_CRC_RX_MANUAL | RFAL_TXRX_FLAGS_NFCIP1_OFF | RFAL_TXRX_FLAGS_AGC_ON | RFAL_TXRX_FLAGS_PAR_RX_KEEP | RFAL_TXRX_FLAGS_PAR_TX_NONE;

Very similar to yours but looking at your description I find rfalStartTransceive (low level) mixed with rfalNfcDataExchangeGetStatus(higher level). The rfalNfc layer only supports byte oriented frames - did you hack into this layer?

Also the rxRcvdLen being set to 8192 shouldn't happen...

Best Regards, Ulysses

Looks like the issue was indeed mixing low level with higher level. Using rfalGetTransceiveStatus fixed my issue. I also had some synchronization issues I fixed.

Thanks for the quick response!

Regards,

Augusto