cancel
Showing results for 
Search instead for 
Did you mean: 

ST25R3920B communicate with M1 card

zhangxixun
Associate II

When we use 3920B to read the M1 card, the data sent to 3920B by MCU is "60 3C 1A 80", but compared with the data sent by 3920B captured by equipment, it is found that there are two more bytes "00 00" behind the data sent by 3920B. The difference is shown in the attached picture. 

SPI和实际发送数据差异.png卡片端正常回复数据.png

Why does the data sent by 3920B have two more bytes?

Will this extra byte affect the total length of bytes sent?
Use the rfalNfcDataExchangeStart () function to send data, but only the interruption of sending data is completed, and there is no interruption of receiving data, so it has been circulating in do while. The card did not reply to the data sent by 3920B. Is this phenomenon related to the abnormality of the data sent by 3920B?

发送数据接口.png  

4 REPLIES 4
zhangxixun
Associate II

I was originally at err = rfalStartTransceive( &ctx); this statement returns an error value of 24 (that is, ERR_NOTSUPP). After the seventh bit of ctx.flags is set to 1, the data can be sent and the card has a reply. Please also confirm that this modification disables automatic CRC checking, will it affect the subsequent procedures?

Brian TIDAL
ST Employee

Hi, 

those 2 extra bytes are the CRC of 603c1a80

BrianTIDAL_0-1758274802763.png

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.

Hi Brian,

thanks for your reply. If I set the seventh bit of ctx.flags to 1(that is disabling automatic CRC checking),will it affect the subsequent procedures?Will it have any impact on sending and receiving data?

BR 

Zhang

Hi,

It is recommended to use the enumeration values of the flags defined in rfal_rf_hRFAL_TXRX_FLAGS_<xxx>. If your application handles the CRC generation, RFAL_TXRX_FLAGS_CRC_TX_MANUAL should be used instead of RFAL_TXRX_FLAGS_CRC_TX_AUTO.

See RFAL_TXRX_FLAGS_CRC_RX_MANUAL vs. RFAL_TXRX_FLAGS_CRC_RX_AUTO to disable/enable automatic CRC check.

See https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/mifare-classic-reading-with-st25r3916/td-p/681100 and https://community.st.com/t5/st25-nfc-rfid-tags-and-readers/nfc0541-read-mifare-classic-1k/m-p/255197 for related questions.

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.