Lis2mdl_registers have change after reboot

Hello everyone,

I have a question regarding the LIS2MDL sensor.

When I configure Register A, it correctly takes the value that I set. However, after the sensor initialization and boot sequence, Register A returns to its default value, even though I am not modifying it anywhere else in the code (the initial driver that change to contiunous mode etc etc) ......

As suggested, I added some debug messages (displayed in red for better visibility), and they confirm that the register is correctly configured at first, but later it unexpectedly reverts to its default value.

Has anyone encountered this behavior before, or could there be a step during initialization/boot that resets the register configuration?

Thank you.


Parents
  • Hi,

    I am not familiar with this issue, nor LIS2MDL myself, unfortunately. How are you interacting with it? I see there is some support for it here and there, eg. using this shield. There is also some mention of it on DevZone previously, which might contain useful info. Like this. Are you using a default driver?

    I would either assume that there is something simply wrong with the communication (try a logic analyzer), or that it needs some other configuration for it to really store the value you have on register A (check the datasheet). Are you seeing this on multiple devices or just one? (Could be HW)

    Regards,

    Elfving

Reply
  • Hi,

    I am not familiar with this issue, nor LIS2MDL myself, unfortunately. How are you interacting with it? I see there is some support for it here and there, eg. using this shield. There is also some mention of it on DevZone previously, which might contain useful info. Like this. Are you using a default driver?

    I would either assume that there is something simply wrong with the communication (try a logic analyzer), or that it needs some other configuration for it to really store the value you have on register A (check the datasheet). Are you seeing this on multiple devices or just one? (Could be HW)

    Regards,

    Elfving

Children
No Data
Related