cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot read chip ID for ST25R3918

Mihaita Ivascu
Associate II

Hello,

 

     I am trying to work with ST25R3918 part.

    I have followed the suggestion here: Solved: ST25R3918 - STMicroelectronics Community for firmware and example usage.

    The board itself is a NUCLEO-WL55JC1. I have tried both I2C and SPI communication but I cannot even read chip id reg(0x3F). According to the datasheet Datasheet - ST25R3918 - Multi-purpose NFC transceiver SPI/I2C should work even if the rfid is not in power wake up mode so reading the chip id register should be possible. ST32CubeIDE examples also seem to do the ID reading before any other configuration.

   I don't receive anything on SPI/I2C when reading that reg. 

   I would like to know if somebody which is familiar ST25R3918 is aware of any additional register configuration before being able to retrieve the chip id reg. 

 

Thanks,

      Mihai

 

2 REPLIES 2
Ulysses HERNIOSUS
ST Employee

Hello,

chip ID is always readable. IMO the only relevant conditions should be VDD_IO being present and chip being powered such that VDD_D is properly powered up (typically at 3.4V when 5V VDD are used).

Please verify the sent SPI waveforms and check the MISO pin to be high-ohmic from MCU side.

BR, Ulysses

 

Hello Ulysses,

We are using a NFC 5 Click board from Mikroelektronika, configured for I2C communication, 5V VCC and VIO. The power comes ok and we are currently testing with Arduino. Upon implementing the following code:

#include <Wire.h>

#define ST25R3918_I2C_ADDRESS 0x50  // 7-bit I2C address
#define DEVICE_ID_REG         0x3F  // Device ID register address

void setup() {
  Serial.begin(9600);
  Wire.begin();  // Join the I2C bus as a master

  delay(100);  // Small delay to allow the device to boot

  // Request to read the device ID
  for(int reg_add = 0; reg_add<=0x3F; reg_add++) {
 
  Wire.beginTransmission(ST25R3918_I2C_ADDRESS); // transmit to device #44 (0x2c)
  // device address is specified in datasheet
  Wire.write(byte(0x02));            // sends instruction byte
  Wire.write(byte(0xFF));            // sends instruction byte
  //Wire.write(byte(0x10));            // sends instruction byte
  Wire.endTransmission();     // stop transmitting
 
 
  Wire.beginTransmission(ST25R3918_I2C_ADDRESS);
  //Wire.write(DEVICE_ID_REG);  // Register address
  //Wire.write(ST25R3918_I2C_ADDRESS);
  Wire.write(reg_add);
  Wire.write(ST25R3918_I2C_ADDRESS);
  if (Wire.endTransmission(false) != 0) {  // Repeated start
    Serial.println("Failed to contact ST25R3918");
    return;
  }

  Wire.requestFrom(ST25R3918_I2C_ADDRESS, 5);  // Request 1 byte
  if (Wire.available()) {
    byte chipID = Wire.read();    
    Serial.print("ST25R3918 register 0x");
    Serial.print(reg_add, HEX);
    Serial.print(" value: 0x");
    Serial.print(chipID, HEX);
    Serial.print(" 0x");
    chipID = Wire.read();
    Serial.print(chipID, HEX);
    Serial.print(" 0x");
    chipID = Wire.read();
    Serial.print(chipID, HEX);
    Serial.print(" 0x");
    chipID = Wire.read();
    Serial.print(chipID, HEX);
    Serial.print(" 0x");
    chipID = Wire.read();
    Serial.println(chipID, HEX);
   
  } else {
    Serial.println("Failed to read chip ID");
  }
}

}

void loop() {
  // Nothing to do here
}
 
We get the following output:
 
ST25R3918 register 0x0 value: 0xFF 0x0 0xFF 0x8 0x0
ST25R3918 register 0x1 value: 0xFF 0x50 0xFF 0x8 0x0
ST25R3918 register 0x2 value: 0xFF 0x50 0x50 0x8 0x0
ST25R3918 register 0x3 value: 0xFF 0x50 0xFF 0x50 0x0
ST25R3918 register 0x4 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x5 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x6 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x7 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x8 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x9 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0xA value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0xB value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0xC value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0xD value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0xE value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0xF value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x10 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x11 value: 0xFF 0x50 0xFF 0x50 0x50
ST25R3918 register 0x12 value: 0xFF 0x50 0xFF 0x50 0x50
and it goes on to 0x3F in the same manner.
Do you know what could go wrong?
 
Thank you!
 
Best regards,
Dragos