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
  • Hi,

    Which GPIOs are you using for connecting the sensor? I'm not sure if the power management library will reconfigure any GPIOs used by the sensor when you go to System OFF. If any GPIOs are configured as an input with SENSE enabled, the pin will wake the chip from System OFF if it detects an edge in the correct direction. Have you tried 

    You can check if the wakeup from System OFF was caused by a GPIO or another source by reading out the NRF_POWER->RESETREAS register.

    Best regards,
    Jørgen

  • You can see the portion of the schematic containing both sensors in my attachment.

    I don't necessarily believe that the power manager module is to fault for this, I simply think it's the sensor driver

    itself not turning off the sensor correctly.

    I don't think it's a hardware issue since when the sensor driver is not initialised in software, this issue does not happen and the board can successfully stay in SYSTEM OFF. However, including the driver in configuration is reason enough for the board to wake up from SYSTEM OFF.

    I will check the register as soon as I have the chance (tomorrow).

    feathers.pdf

Reply
  • You can see the portion of the schematic containing both sensors in my attachment.

    I don't necessarily believe that the power manager module is to fault for this, I simply think it's the sensor driver

    itself not turning off the sensor correctly.

    I don't think it's a hardware issue since when the sensor driver is not initialised in software, this issue does not happen and the board can successfully stay in SYSTEM OFF. However, including the driver in configuration is reason enough for the board to wake up from SYSTEM OFF.

    I will check the register as soon as I have the chance (tomorrow).

    feathers.pdf

Children
No Data
Related