LIS2MDL prevents nRF52833 from staying in SYSTEM OFF

I am using the common application framework of the nrf connect sdk. Specifically, I am testing the power manager module to put the board in OFF mode.

However, there is an issue whenever I include the node corresponding to the LIS2MDL magnetometer in my overlay file and I enable CONFIG_SENSOR and CONFIG_SPI.

Even if the board goes to sleep successfully, it will get awoken again within a second by what I can only assume is data coming in from the sensor which triggers a GPIO signal.

This behaviour simply does not happen when CONFIG_SENSOR is disabled, or when my overlay file does not include the LIS2MDL.

For reference, the board also has a LSM6DSO attached to the same SPI interface, which does not reset the board once in SYSTEM OFF.

Checking the LIS2MDL zephyr driver I noticed that it is supposed to handle suspension on its own, but clearly this is not happening.

Any help will be appreciated.

Kind regards,

feathers

Parents Reply
  • I am not using the LIS2MDL trigger in my application, simply the SPI interface, therefore I am not sure which pin I would disable.
    I also made a simple MRE that demonstrates this problem.
    Simply by changing CONFIG_SENSOR from y to n the board stays in SYSTEM OFF successfully, otherwise it doesnt.
    You can check it here.
    github.com/.../SYSTEM_OFF_LIS2MDL_POC

    Also worth mentioning I tried without the power manager to directly turn off power with

        nrf_power_system_off(NRF_POWER);

    and it seems to work that way.


    EDIT: I checked the register, and the reason is due to a soft reset (?) NRF_POWER_RESETREAS_SREQ_MASK.

Children
No Data
Related