cancel
Showing results for 
Search instead for 
Did you mean: 

Send SPI Commands to Farsens ANDY100 RFID Tag using ST25RU3993-EVAL board

SBoud.2
Associate

I am using the ST25RU3993-EVAL board and its software GUI to read data from RFID-Tag ( Andy100 more informations in the Data-Sheet below).

The tag can communicate with external devices (sensors/ external storage units) via spi. The SPI-Commands can be sent from the reader via rfid-waves. I am struggling to send commands to read/write data from/on an EEPROM (which is connected to the Tag via spi), because of lack of documentation on the structure of the commands sent by the reader. All i have from the user manual of ST25RU3993 evaluation board software GUI is an example of generic command about reading the first word in TID memory from address 0. I have tried to modify this command to access the memory address I am aiming to read (I have written some numbers in these addresses) but I am still getting some random numbers every time.

I hope somebody could help me with it.

Here are datasheets of the RFID-Tag ( IC and PCB) and the EEPROM (M95010-RDW6TP) I am using.

1 ACCEPTED SOLUTION

Accepted Solutions
Nick K
ST Employee

Hello SBoud.2

To send custom ISO 18000-6C (EPC Class1 Gen2) commands the following SDK function can be used STUHFL_T_RET_CODE Gen2_GenericCmd(STUHFL_T_Gen2_GenericCmd *genericCmd)

This SDK uses the following data strcuture.

typedef struct {

 uint8_t pwd[STUHFL_D_PASSWORD_LEN]; /**< I Param: Access password. If pwd set to 0x00000000 access command prior to generic command is skipped. */

 uint8_t cmd; /**< I Param: Generic command. */

 uint8_t noResponseTime; /**< I Param: Tag response timeout. */

 uint16_t expectedRcvDataBitLength; /**< I Param: Size in bits of expected received data. NOTE: For the direct commands 0x90 and 0x91 (Tranmission with CRC) CRC is handled by HW and need not to be included into the expected bit count. The received CRC will also not replied to the host. When using command 0x92 handling of any data integrity checking must be done manually.*/

 uint16_t sndDataBitLength; /**< I Param: Size in bits of data sent to Tag. */

 bool appendRN16; /**< I Param: Append tag handle to generic command. */

 uint8_t sndData[STUHFL_D_GEN2_GENERIC_CMD_MAX_SND_DATA_BYTES]; /**< I Param: Data being sent to Tag. */

 uint16_t rcvDataLength; /**< O Param: Size in bytes of received data from Tag. */

 uint8_t rcvData[STUHFL_D_GEN2_GENERIC_CMD_MAX_RCV_DATA_BYTES]; /**< O Param: Data received from Tag. */

} STUHFL_T_Gen2_GenericCmd;

When executing this ST25R3993 Eval board FW function, it brings first the transponder into Acknowledged state (sending Query/ACK command).

Then, if a pwd is given a access command is executed to bring the transponder into secured state, otherwise the access command is skipped.

After this procedure the exchange of a custom command as defined by the data from sndData happens.

See below further detailes of the parmeters from the structure "STUHFL_T_Gen2_GenericCmd"

  1. Parameter "pwd": Access password. To skip usage of Access command the password must be set to pwd[] = {0,0,0,0} 
  2. Parameter "cmd": 0x90, 0x91 or 0x92 (Transmission with CRC, Transmission with CRC Expecting Header Bit, Transmission without CRC). For details regarding the difference of these direct command codes please have a look to the ST25R3993 DataSheet - section "2.2.3 Direct commands"
  3. Parameter "noResponseTime": This define the value of the register 0x07: Rx no response time register (See DS - section "Rx no response time register")
  4. Parameter "expectedRcvDataBitLength": Size in bits of expected received data. For the direct commands 0x90 and 0x91 (Tranmission with CRC) CRC is handled by HW and did not need to be included into the expected bit count. The received CRC will also not replied to the host. When using command 0x92 handling of any data integrity checking must be done manually.
  5. Parameter "sndDataBitLength": Size in bits of data to be sent to transponder
  6. Parameter "appendRN16": If true then the FW appends the current tag handle to generic command, as most of the Gen2 commands need.
  7. Parameter "sndData": Payload data being to be sent to transponder
  8. Parameter "rcvDataLength": Size in bytes of received data from transponder
  9. Parameter "rcvData": Data received from transponder.

When using the SDK, please also check the STUHFL_T_RET_CODE from the function.

The ST25R3993 DataSheet can be downloaded from the following location https://www.st.com/resource/en/datasheet/st25ru3993.pdf

BR

Nick

View solution in original post

1 REPLY 1
Nick K
ST Employee

Hello SBoud.2

To send custom ISO 18000-6C (EPC Class1 Gen2) commands the following SDK function can be used STUHFL_T_RET_CODE Gen2_GenericCmd(STUHFL_T_Gen2_GenericCmd *genericCmd)

This SDK uses the following data strcuture.

typedef struct {

 uint8_t pwd[STUHFL_D_PASSWORD_LEN]; /**< I Param: Access password. If pwd set to 0x00000000 access command prior to generic command is skipped. */

 uint8_t cmd; /**< I Param: Generic command. */

 uint8_t noResponseTime; /**< I Param: Tag response timeout. */

 uint16_t expectedRcvDataBitLength; /**< I Param: Size in bits of expected received data. NOTE: For the direct commands 0x90 and 0x91 (Tranmission with CRC) CRC is handled by HW and need not to be included into the expected bit count. The received CRC will also not replied to the host. When using command 0x92 handling of any data integrity checking must be done manually.*/

 uint16_t sndDataBitLength; /**< I Param: Size in bits of data sent to Tag. */

 bool appendRN16; /**< I Param: Append tag handle to generic command. */

 uint8_t sndData[STUHFL_D_GEN2_GENERIC_CMD_MAX_SND_DATA_BYTES]; /**< I Param: Data being sent to Tag. */

 uint16_t rcvDataLength; /**< O Param: Size in bytes of received data from Tag. */

 uint8_t rcvData[STUHFL_D_GEN2_GENERIC_CMD_MAX_RCV_DATA_BYTES]; /**< O Param: Data received from Tag. */

} STUHFL_T_Gen2_GenericCmd;

When executing this ST25R3993 Eval board FW function, it brings first the transponder into Acknowledged state (sending Query/ACK command).

Then, if a pwd is given a access command is executed to bring the transponder into secured state, otherwise the access command is skipped.

After this procedure the exchange of a custom command as defined by the data from sndData happens.

See below further detailes of the parmeters from the structure "STUHFL_T_Gen2_GenericCmd"

  1. Parameter "pwd": Access password. To skip usage of Access command the password must be set to pwd[] = {0,0,0,0} 
  2. Parameter "cmd": 0x90, 0x91 or 0x92 (Transmission with CRC, Transmission with CRC Expecting Header Bit, Transmission without CRC). For details regarding the difference of these direct command codes please have a look to the ST25R3993 DataSheet - section "2.2.3 Direct commands"
  3. Parameter "noResponseTime": This define the value of the register 0x07: Rx no response time register (See DS - section "Rx no response time register")
  4. Parameter "expectedRcvDataBitLength": Size in bits of expected received data. For the direct commands 0x90 and 0x91 (Tranmission with CRC) CRC is handled by HW and did not need to be included into the expected bit count. The received CRC will also not replied to the host. When using command 0x92 handling of any data integrity checking must be done manually.
  5. Parameter "sndDataBitLength": Size in bits of data to be sent to transponder
  6. Parameter "appendRN16": If true then the FW appends the current tag handle to generic command, as most of the Gen2 commands need.
  7. Parameter "sndData": Payload data being to be sent to transponder
  8. Parameter "rcvDataLength": Size in bytes of received data from transponder
  9. Parameter "rcvData": Data received from transponder.

When using the SDK, please also check the STUHFL_T_RET_CODE from the function.

The ST25R3993 DataSheet can be downloaded from the following location https://www.st.com/resource/en/datasheet/st25ru3993.pdf

BR

Nick