LIS3MDL - Register Wrap Around #2

Closed
opened 2020-10-30 15:46:21 +01:00 by muellerr · 3 comments
Owner

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?).

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?).
Member

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.

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.
Author
Owner

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.

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.
Author
Owner

Adaptions done and tested. As soon as local pools have been integrated into the FSFW, I will create the pull request.

Adaptions done and tested. As soon as local pools have been integrated into the FSFW, I will create the pull request.
mohr referenced this issue from a commit 2021-07-29 12:18:35 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: eive/eive-obsw#2
No description provided.