Hello,
I have 2 questions regarding the special read mode of the TMAG5170. I am not sure what I’m doing wrong here, but these 2 behaviors seem to be different from what the datasheet says. I have implemented workarounds for both of them, but I need confirmation that this is how the sensor should behave.
First Problem: The order of the data that I get with special read.
This is a graphic from the data sheet that shows the meaning of the 32 bits in special read mode.
My problem is: If I interpret the data like this, the values don’t make any sense. But when interpret it as if the 4 STAT bits were the first ones, the values make sense again. Here are little drawings of how the data should be (first) and how it seems to be for my sensor (second):
Can anybody confirm that the data in special read mode is in the order that is shown second? It is easy to see that the first nibble is just the counter. I used YZ and XY as data type.
Second Problem: The CRC in special read mode
I implemented the CRC calculation as specified in the datasheet. It works when I write registers and it works when I read registers in standard mode. However, in special read mode, the last Bit is always wrong.
For example, the sensor returns E0 0F F1 A7
In this case I calculate the CRC for E0 0F F1 A0
And I get 6 instead of 7, which is the CRC that the sensor sends
The wrong last Bit is reliable and if I just change that at the end of the CRC calculation, it works perfectly. What am I doing wrong here?
Thanks in advance!