2025-05-09 2:35 AM
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
Solved! Go to Solution.
2025-05-13 12:36 PM
Actually the issue was that both Wire.endTransmission() and seemingly the st25r3918 driver from stm32cubeIDE are setting a STOP bit after first part of i2c transaction(when the master writes the register address it wants to read)
maybe repeated start is not implemented correctly in the driver. I will check it
Testing with Wire.endTransmission(false) helped me understand what the issue was
Thanks for the good tips. will close the topic
2025-05-09 4:25 AM
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
2025-05-09 6:11 AM
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:
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
2025-05-11 8:47 PM
Hi,
don't know this board in details. There was a similar topic some time ago. Maybe it helps:
BR, Ulysses
2025-05-11 11:27 PM
Hello Ulysses,
Thank you for your reply. The board we are using is a simple breakout board for the ST25R3918 chip: https://www.mikroe.com/nfc-5-click
IO checked the issue above and it doesn't have common points with our issue: the electrical connections are very straight forward in our case, we are connecting GND, 3v3, 5v and I2C lines between the STM32 board and the NFC board.
Thank you!
Best regards,
Dragos
2025-05-12 2:13 AM
Hi,
I believe the register read sequence is incorrect:
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;
}
Here is a typical read sequence:
This reads the 4 interrupt registers 1Ah-1Bh-1Ch-1Dh
Make sure to follow the section 4.3.4 I2C interface from the Datasheet.
Rgds
BT
2025-05-12 7:45 AM
Hello Brian,
Thanks for your reply.
Yes I have checked the datasheet and tried also with this sequence:
so it seems mode byte is ommitted even though I set it
2025-05-12 8:12 AM
Hi,
I would suggest to connect a logic analyzer or a scope on the SCL and SDA signals. Also, check the Wire.endTransmission() return code.
Rgds
BT
2025-05-13 12:15 PM
Hello BT,
Thanks for the suggestions.
Wire.endTransmission() returns 0 so it's ok.
I can read chip ID reg(0x3F) and any reg for ST25R3918 but only in this mode(when doing a dump of registers):
even though I send byte mode according to the datasheet and the Wire.endTransmission() afterwards returns 0(transfer completed)
2025-05-13 12:36 PM
Actually the issue was that both Wire.endTransmission() and seemingly the st25r3918 driver from stm32cubeIDE are setting a STOP bit after first part of i2c transaction(when the master writes the register address it wants to read)
maybe repeated start is not implemented correctly in the driver. I will check it
Testing with Wire.endTransmission(false) helped me understand what the issue was
Thanks for the good tips. will close the topic