Skip to content

BUG: Read-out of XYZ values. #1

@RemonDijkstra

Description

@RemonDijkstra

Hi!

Thanks for the great work on setting up this module.
However I think I have found a problem in your implementation.

If the accelerometer is free running (Active) and you use "MC34xx_Get_XYZ_Float" in a polling mode you can have the situation that the register contents changes to new samples while reading.

Explanation:
You use 6 seperate I2C reads to read XH, XL, YH, YL, ZH and ZL in "MC34xx_Get_XYZ_Float"

The datasheet states that the register content does not change during I2C read (Chapter 11) of PDF.
However your code uses 6 reads. So you are unsure if those 6 registers belong to eachother.

In my oppineon you should use only 1 I2C command to read 6 bytes at once.

Kind regards,

Remon Dijkstra.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions