2023-12-28 12:57 PM - edited 2023-12-28 12:58 PM
Using st25DV tag on our embedded system.
In short, the second I2c read does not display the same data that was written. It differs, as the first byte changes to 0xFF.
When I write to the mailbox the first time, and then read the data, it's the same. ( usually just a couple of bytes )
But when I read it again, I see that the first byte changed to 0xFF, and all of the bytes that I had written were shifted.
Here is what it looks like when writing "01 02" to the mailbox and reading it
First read:
01 02 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Second read:
ff 01 02 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
According to the documentation, I can read it multiple times, don't understand why it fails.
Solved! Go to Solution.
2024-01-25 03:04 AM
Hi DS.4,
Data are not shifted in the Mailbox memory, so reading multiple time at same address give you same data (until they are overwritten or cleared).
Are you sure to display correctly the buffer where you store your data.
Maybe sharing some code may help to see what's wrong.
Kind Regards.
2024-01-25 03:04 AM
Hi DS.4,
Data are not shifted in the Mailbox memory, so reading multiple time at same address give you same data (until they are overwritten or cleared).
Are you sure to display correctly the buffer where you store your data.
Maybe sharing some code may help to see what's wrong.
Kind Regards.
2024-01-26 08:13 AM
Hello,
Yes, it is possible to read multiple time into the mailbox the exact same data. There is no shift.
Are you doing something else on the I2C bus between the two reads of the mailbox ?
Best regards.
2024-01-26 04:33 PM - edited 2024-01-26 04:35 PM
I suspect the source of my issue to be the I2C write. I am writing 256 bytes with a method that supports only 255.
So I guess writing is done twice. (255 +1 ).
Please see my other question regarding writing with I2C with DMA.