2021-11-26 12:27 AM
Hi!
I am writing data to the ANT7-T ST25DV04K module from my mobile phone using an app. Now I would like to read that data stored in the ANT7-T ST25DV04K module with a microcontroller. The idea is to make a simple program that only reads the data from the module. What commands should I send to read its stored data?
Solved! Go to Solution.
2021-11-30 02:45 AM
Hello,
The ANT7 board does not require anything special on the START bit, it is perfectly in the I2C specification, so I see no reason why it should be different from any other I2C device on this START condition...
The problem looks to be more on the microcontroller side, since there is no action from the ANT7 part in the START bit. I'm sorry, but I'm not aware of how TI microcontroller works, so it is difficult for me to help. You may contact TI support for help on the MSP micro.
One idea: is there pull-up resistors on the I2C bus on your microcontroller board ?
The I2C bus requires pull-up resistors on the SDA and SCL signals. Those pull-up are not present on the ANT7 board, and must be added externally.
So may be your microcontroller board doesn't have those pull-up resistors, which may explain your problem with START condition (and may be other boards you tested do have those pull-ups, which explains why they work)
Best regards.
2021-11-26 05:24 AM
Hello,
You can read (and write) ANT7-T ST25DV04K module from a microcontroller using the I2C bus.
I2C command to use are described in the ST25DV-I2C datasheet (https://www.st.com/resource/en/datasheet/st25dv04k.pdf) in chapter "6.5 I2C read operations" (you can see "Figure 29. Read mode sequences").
For example, if you want to read 3 bytes at EEPROM memory address 0x0000, you can send the following I2C command: Start/0xA6/Ack/0x00/Ack/0x00/Ack/Start/0xA7/Ack/Byte 0/Ack/Byte 1/Ack/Byte 2/Nack/Stop
Best regards.
2021-11-26 05:59 AM
Hello,
Okay, I understand more or less the idea. But I still have some doubts:
Thank you very much for your help and sorry for my inexperience,
Best regards.
2021-11-26 06:34 AM
Hello,
You can read the i2C specification which is public and free to understand better how I2C works, and you can probably easily find tutorials on how I2C works on internet as a good start.
Nevertheless, it is most probable that there is already a library for your MCU that can handle directly all those I2C bits and bytes signaling hassle. Most of the MCUs do have I2C integrated IPs that silently manage all this and are provided with libraries to easily use the MCU's I2C bus. You may start by looking for this?
Best regards.
2021-11-30 12:51 AM
Hello,
Thank you very much for the information, I understand how to do the communicate but I am having problems.
When I send the START condition code, the TXIFG flag should be activated to start sending the command through i2c. What happens is that the flag is not raised, so I can't send the commands and I can't configure it.
I have tried the same code with other boards and it works, the problem is with the ANT7-T-ST25DV04K but I don't know how to solve it. Any recommendation?
2021-11-30 01:42 AM
Hello,
Can you please tell what microcontroller you are using exactly ? Which SW library you are using with it ?
Best regards.
2021-11-30 01:52 AM
Hello,
Yes, I am using MSP430FR2433 with the "msp430.h" library.
2021-11-30 02:45 AM
Hello,
The ANT7 board does not require anything special on the START bit, it is perfectly in the I2C specification, so I see no reason why it should be different from any other I2C device on this START condition...
The problem looks to be more on the microcontroller side, since there is no action from the ANT7 part in the START bit. I'm sorry, but I'm not aware of how TI microcontroller works, so it is difficult for me to help. You may contact TI support for help on the MSP micro.
One idea: is there pull-up resistors on the I2C bus on your microcontroller board ?
The I2C bus requires pull-up resistors on the SDA and SCL signals. Those pull-up are not present on the ANT7 board, and must be added externally.
So may be your microcontroller board doesn't have those pull-up resistors, which may explain your problem with START condition (and may be other boards you tested do have those pull-ups, which explains why they work)
Best regards.
2021-11-30 03:14 AM
Hello,
Thanks for the help, it seems that the error may be due to the lack of pull-up. Now the flag is activated and I can send the first byte. The problem now is that it only sends one byte, the flag is not activated again to send the next byte. I will keep looking for another solution to this, I understand that you can't help me more.
Best regards.
2021-11-30 04:49 AM
Good!
I'm glad I could help you progress in your project :)
Best regards.