LIS3MDL - Register Wrap Around #2
Labels
No Label
OPS TODO
api change
breaking api change
bug
documentation
duplicate
feature
help wanted
invalid
question
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: eive/eive-obsw#2
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The LIS3MDL auto increment function wraps around after reading the second Z-Axis register.
Therefore, all values read after that register propably are not correct in the current
implementation.
I suggest splitting up the the read process in two-steps. In one step, the regular control register + data registers are read and in the second one, the the temperature and rgisters after that are read. The second step could also read the WHO_AM_I register every once in a while (e.g. every 5th read?).
I support the idea to split the commands, but give to consider that you need two SPI Requests to the LIS3MDL to get the WHOAMI Register together with the temperature and the subsequent registers.
Additional suggestion: Just ask for the WHOAMI Register at initialization of the DeviceHandler. To monitor the proper functionality compare the values of the control registers between two measurements as they should not change without commanded reconfiguration. So you couls neglect the WHOAMI register during operation.
Okay, I will make these adaptions soon as I have connected an EVAL board to our OBC dev board.
Maybe it's also a good idea to convert gauss to micro tesla to have SI units and because the RM3100 produces microtesla values as well.
Adaptions done and tested. As soon as local pools have been integrated into the FSFW, I will create the pull request.