2025-07-24 1:54 AM
Hi I am using ST25R3916B as NFC reader and it is interfaced with STM32G0B1RT6N via I2C lines. I am not able to communicate with reader IC . I have checked I2C_EN line is connected to VDD_D voltage output from reader IC. it is 2.05V and SCL and SDA lines are pulled up to 3.3V with 10K resistor.
Pls help me where i am doing wrong
Solved! Go to Solution.
2025-07-31 1:13 AM
Hi Ulysses
Pls see below SCL and SDA signals. I am not getting any ACK from NFC reader IC though it is showing there is some device on 50h address. I am using address 50h as mentioned in the datasheet . I have lift shifted 0X28 to get the 50h as it was expected in HAL.
Thanks
Dilip
2025-07-31 1:35 AM
Hi,
0x50 vs 0x28 is an effect of different interpretation if the direction bit is regarded to belong to the address or not. Digital waveforms look about right. As there is no ACK, you should now look into the analog using two scope probes to see if the device really does not react at all or if the data is incorrectly sampled due to analog (non-optimal pull-ups, etc.).
BR, Ulysses
2025-07-31 6:45 AM
Hi Ulysses,
Pls see below analog waveforms also along with digital decode for these waveforms. This also looks good and no pull up issue here. Right?
Thanks
Dilip
2025-07-31 7:51 AM
Hi,
looking at it again: You are using the wrong device address. The address is 0x50 - also Saleae should display it as such. Typically on STM32 you need to use (0x50<<1) = 0xA0 as they include the direction bit.
BR, Ulysses
2025-08-01 3:04 AM
Hi Ulysses,
Thanks for your suggestions. I have implemented the address 0XA0. In this it is showing that it is writing to register but while reading back same register, it is showing FF. See below snap shot of digital decode and analog waveform. Can you pls suggest what else need to be done?
2025-08-01 3:25 AM
Hi,
as per DS you need to use a repeated Start condition. Here you are showing Stop condition followed by Start condition.
Ulysses
2025-08-01 4:54 AM
Hi Ulysses ,
What do you mean by repeated start condition. I dont understand. Can you pls explain in detail, how to implement it and where it is mentioned in datasheet?
2025-08-01 5:02 AM
Hi,
in the DS look for "Repeated Start", the diagrams in chapter "I2C" interface and the I2C spec. Repeated Start is a Start condition without previous Stop condition.
Ulysses
2025-08-02 12:36 AM
Thanks Ulysses. I have looked into the datasheet. It says repeated start for register space B reading . I am just reading register space A . Do you think it is needed for reading the register space A also. If yes, can you pls help me how to implement that in the software code?
Thanks
Dilip
2025-08-04 4:16 AM
Hi,
Reading space A or space B register on I²C behaves the same way regarding the repeated start. See figure 24 in the ST25R3916B datasheet.
The code supporting I²C is available in the X-CUBE-NFC6 package and the ST25R Embedded library (files i2c.h and i2c.c). These packages provide the RFAL NFC communication stack, the ST25R3916B driver, and some demos. Using the X-CUBE-NFC6 package (or the ST25R Embedded library) is encouraged rather than developing code from scratch.
Rgds
BT