Hi,
I am using an nPM1300 together with an nRF5340 and an LIS2DW12 accelerometer. The nRF is powered from VOUT1 on the PMIC, and after some time of inactivity it is turned off by disabling BUCK1. Upon movement, BUCK1 should be enabled again by a latched interrupt from the accelerometer routed to GPIO0 on the PMIC.
However, when configuring the interrupt and GPIO input to active low, the signal does not respond to movement, it just stays at the higher voltage level. If I instead set it to active high, the interrupt comes in as expected, but when the nRF wakes up, it clears the interrupt before I can disable the GPIO control on BUCK1, so the negative edge turns it off again.
I am powering the PMIC VDDIO from an external source and have removed the jumper on P18. The accelerometer interrupt is configured as push-pull.
The overlay options for BUCK1 are the following:
npm1300_buck1: BUCK1 { regulator-min-microvolt = <1000000>; regulator-max-microvolt = <3300000>; retention-microvolt = <1000000>; enable-gpios = <&npm1300_gpio 0 GPIO_ACTIVE_LOW>; };
How can I either get the active low interrupt to work on the PMIC or make sure that an active high interrupt does not clear when the nRF wakes up?
Thanks,
Silvia
Edit: I have found a third option where I also run into a road block. The idea is to configure the accelerometer interrupt as pulsed and active high, and the buck control GPIO as active low so that the negative edge of the pulse will enable BUCK1. Only INT2 on the LIS2DW12 can generate sleep change interrupts which is what would be required for this to work. INT2 is also routed to the nRF and used when it is awake, so I would have to enable and disable the GPIO control of the buck accordingly. The problem I found is that after GPIO control has been enabled by writing to register BUCKENCTRL of the PMIC, it is not possible to disable it by writing to the same register again, everything just crashes. Why is it not possible to disable GPIO control this way?
Edit 2: I found a solution based on the third option but instead of trying to enable/disable the buck control, I instead reconfigure the accelerometer to route all INT2 interrupts to INT1 before disabling BUCK1 so that the sleep change pulse can enable it again. So problem solved (I hope), but I'm still curious why none of the other options worked.