cancel
Showing results for 
Search instead for 
Did you mean: 

ST25DV Problem when trying to read register, NACK received when sending the address MSB .

CLANC.11
Associate II

Hi,

I have an ST25-ANT and I'm trying to make it work on a Nucleo F070RB. When I send the I2C Start there is no problem the device is recognized but then I try to send the MSB of the address and a NACK appears, I don't understand why the ST25DV takes the start condition but nut the register address I'm trying to read .

Here is my I2C configuration :

0690X00000DYlPIQA1.jpg

And my read function :

0690X00000DYlPJQA1.jpg

Any help is appreciated, thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
CLANC.11
Associate II

Hi @Rene Lenerve​ 

I found the problem, after sending the register address I was looking at the wrong flag. It's not TXIS but TC for transmission complete so that the device know the address has been sent.

Best Regards.

View solution in original post

9 REPLIES 9
Rene Lenerve
ST Employee

Hi @CLANC.1​ ,

Which register are you trying to read?

When you send the start on I2C, does the device address is correctly sent and ACKed?

Best Regards.

CLANC.11
Associate II

Hi @Rene Lenerve​ ,

Well I was trying to read 0014h register (memory size) just to see if my I2C was working.

I viewed my I2C start signal on an oscilloscope and it's all good device address is 1010111R/W and is ACKed that's why I don't understand how the register address isn't.

Best regards.

Rene Lenerve
ST Employee

Hi @CLANC.1​ ,

Are you sure of timing values you recorded in the I2C_TIMINGR?

Using cubeMX and NucleoF070RB board selection I got different value for this register to configure with 48MHz MCU and 100kHz I2C

-> 0x20303E5D

Prescaler 2

SCLDEL 3

SDADEL 0

SCLH 3E

SCLL 5D

Best Regards.

CLANC.11
Associate II

Hi @Rene Lenerve​ ,

Yes, I'm am sure I have tested both configuration on O-scope and they are similar except mine have 50% duty cycle and yours 40%,strangelly my O-scope register a 50kHz frequency instead of 100kHz for both configuration so I tryed with 100 khz but unfortunnatly none of the configuration would work.

I'm a bit confused by my problem here how come the device address is ACKed but after that I get a NACK on register adress ... I'm starting to think there is something in the NFC part that is blocking I2C communication but I did reset the memory with the ST App so I don't know what it might be.

Thank for taking your time trying to help me.

Best regards.

Rene Lenerve
ST Employee

Hi @CLANC.1​ ,

Have you tried to read on another memory address for example at 2000h Dynamic register or EEPROM at 0000h (those 2 addresses must have the E2 bit at 0) ?

Another point, but I don't think this is the cause of your problem, if you have a 12 pins package you must set LPD (Low Power Down) input to 0.

Best Regards.

CLANC.11
Associate II

Hi @Rene Lenerve​ ,

That does not work either the module can't seem to take any register address.

I have the ST25DV-Discovery_ANT_C5 according to the schematics LPD is pulled down by a resistor, I connected it to GND but it changes nothing.

Best regards.

Rene Lenerve
ST Employee

HI @CLANC.1​ ,

That's very strange, I don't see in your code something that seems wrong, on the shared part and to send the first byte.

Here are some other ideas to check:

Are you sure that the VCC is correctly powered on the ST25DV?

Can you access the Tag memory and registers with and without VCC ON using a phone or an NFC reader?

On the ST25DV-Discovery_ANT_C5 there is 2 pull-up resistors for SCL and SDA (1k5 ohms), are they suitable for your assembly?

Best Regards.

CLANC.11
Associate II

Hi @Rene Lenerve​ ,

I have checked my Vcc, I am using the 3.3V output from the F070RB which is powered by USB and I don't think the tag requires external power.

I can access to everything using a phone VCC ON or OFF. I also have the Motherboard with the screen and it work perfectly with it so the problem comes from me and not the board. I also have F072RB doesn't work on those neither.

1k5 ohm pull up seems fine for 3.3V supply.

I continue to search for solution.

Best Regards.

CLANC.11
Associate II

Hi @Rene Lenerve​ 

I found the problem, after sending the register address I was looking at the wrong flag. It's not TXIS but TC for transmission complete so that the device know the address has been sent.

Best Regards.