2024-09-13 01:04 AM
Hello everyone,
I'm working with the Nucleo NFC07A1 board, which mount the ST25DV64KC chip, to create a simple Tag-Reader system. At the moment, I'm testing the ST25 with my smartphone, using the ST25 Android app.
A user from the ST community suggested I use the "Send Custom Command" function on the Android app to send commands via the RF antenna coils.
I started with simple commands, and they worked fine. For example, I was able to read and write to the EEPROM and check the configuration of some registers, all without any issues.
However, when I try to use the Mailbox read and write commands, nothing seems to work. Here's what I did:
Next, I sent the following message through the "Send Custom Command" menu using this configuration:
Command: 20 CA 02 0B D2 15 76 66 51 02 E0 03 11 22 33 44
The tag responds with one of these two error messages:
However, I’m sure tag and smartphone are connected, as the interrupt on GPO is triggered, and the RF_FIELD bit is high.
After these errors, I checked the MB Control Dyn register again, and it was written with the value 0x85, which I believe indicates that the Mailbox was written. Is that correct?
Before suggesting other approaches, I want to clarify that I’ve already tried various methods. For example, I’ve tried sending messages without enabling FTM mode first, and I’ve also tried enabling the High Data Rate flag. Regardless these variations, I keep encountering the same issue.
Could anyone help me understand how to correctly write to the Mailbox using the Android app?
Thank you in advance!
Best Regards.
Solved! Go to Solution.
2024-09-19 02:41 AM
Hello,
Yes, you need to keep register 0x2006 to 1 (MB_EN) in order to continue to use the mailbox. Same thing for config Byte 0x000D. If MB_EN is written to 0, the mailbox is not accessible anymore, and you will read only FF if try to read from I2C (and error 0x0F if you try to read from RF).
As long as you keep MB_EN=1 in MB_CTRL_Dyn regsiter (0x2006), you CANNOT write into EEPROM memory. Read is possible. So, if you want to write into EEPROM you must set MB_EN back to 0.
It is normal to have MB_LEN_dyn equal to message lenght-1 as explained in the datasheet "Table 21. MB_LEN_Dyn".
This is to allow to have a 256 Byte long message, as you cannot code more than value 255 in one Byte.
Best regards.
2024-09-19 02:54 AM
Ok it's clear...but if i turn off the mailbox (putting MB_EN to 0) and then i turn on again the mailbox (enabling FTM and mailbox as you clarify before), the value in the mailbox are all resetted to 0xFF or at the previouvs written value?
Thank you.
Best Regards.
2024-09-19 03:01 AM
It's a bit more complicated than this.
The mailbox is never cleared or erased.
If you read FF, it is because it is not accessible. This is intrinsic to I2C bus technology: when you do a read and the I2C slave is not answering, you always get value FF because of the pull-up resistors.
You can only read the mailbox if there is a message inside (written from either RF or from I2C).
When you toggle MB_EN bit from 1 to 0 and then 1, you lose the message, and the mailbox is not accessible until you write a new message in it. This is why you read only FF.
Mailbox should be used in a "ping-pong" way: RF (or I2C) write a message -> I2C (or RF) read the message. Then I2C (or RF) can write a new message, and the other side can read it.
Best regards.