2023-03-22 08:48 AM
Hello!
I am trying to write the memory of a ST25DV64K-I with an EFR32MG13.
I created a wrapper on top of the I2C driver of this micro-controller.
I can send read and write command with no error. But the write command is not working.
For example,
If I am trying the set only one byte at specific address it is working but it always set the memory to 0x00.
I cannot find why. Can you help me understand this behavior?
Thanks a lot.
Solved! Go to Solution.
2023-03-30 09:46 AM
Hello,
The problem may be in your I2C write or in your I2C read commands. Several things can be wrong:
For the last point, it is easy to check by reading from the RF interface, Just be careful when translating RF addresses that are in blocks of 4 Bytes and I2C that addresses that are in Bytes. If you choose address 0000h for both it is simpler.
For the write command, can you post here the exact byte stream that is going to the ST25DV ? Just to check that the I2C write command is correct.
For info, the correct command to write 4 Bytes of 01h at user memory address 0000h (equivalent of a write of block 0000h from RF) would be:
s/A7/a/00/a/00/a/01/a/01/a/01/a/01/a/p where s=start bit, a=acknowledge bit and p=stop bit.
Best regards.
2023-03-30 09:46 AM
Hello,
The problem may be in your I2C write or in your I2C read commands. Several things can be wrong:
For the last point, it is easy to check by reading from the RF interface, Just be careful when translating RF addresses that are in blocks of 4 Bytes and I2C that addresses that are in Bytes. If you choose address 0000h for both it is simpler.
For the write command, can you post here the exact byte stream that is going to the ST25DV ? Just to check that the I2C write command is correct.
For info, the correct command to write 4 Bytes of 01h at user memory address 0000h (equivalent of a write of block 0000h from RF) would be:
s/A7/a/00/a/00/a/01/a/01/a/01/a/01/a/p where s=start bit, a=acknowledge bit and p=stop bit.
Best regards.
2023-04-17 12:59 AM
Hello,
Thanks for your answer!
Thanks to your help, I checked my write command which was good. As a result, I looked at the hardware around the I2C connection and found a problem. Indeed a resistor had a wrong value.
After changing it, the problem was solved.