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

    I tried to run your GitHub sample, but it fails to build for the nrf52833dk_nrf52833 board when CONFIG_SENSOR is set to y, due to some problem with the sensor definitions. Maybe there are some missing defines of the sensors for the DKs that you have for your custom board?

    Anyway, if the RESETREAS is set to SREQ, the issue is likely not caused by a GPIO being wrongly configured when entering System OFF mode, but more likely an error code generated when the board enters the sleep mode. Have you checked the log from your board, to see if it indicates any errors?

    Have you verified if the device enters System OFF mode, and if the wakeup correlates with a signal on one of the GPIOs from the sensor?

    If you can read out all the GPIO PIN_CFG register values (address 0x50000000/0x50000300 + 0x700-0x780) right before entering System OFF (either using the debugger or using nrfjprog), that should indicate if any GPIOs are configured with sense enabled.

    Best regards,
    Jørgen

Children
Related