2020-03-05 02:25 AM
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 :
And my read function :
Any help is appreciated, thanks !
Solved! Go to Solution.
2020-03-09 03:38 AM
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.
2020-03-05 07:03 AM
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.
2020-03-05 07:43 AM
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.
2020-03-06 02:17 AM
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.
2020-03-06 02:55 AM
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.
2020-03-06 05:13 AM
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.
2020-03-06 06:07 AM
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.
2020-03-06 06:49 AM
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.
2020-03-06 07:48 AM
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.
2020-03-09 03:38 AM
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.