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