nPM1300 buck control GPIO not working as active low

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. 

Parents
  • Hello,

    Sorry for the late reply. I am trying to understand what you are doing. Have you connected the interrupt pin from the accelerometer both to the PMIC and the nRF5340? And you are trying to detect on wakeup whether it was the accellerometer that woke it up? If that is the case, wouldn't it be safe to assume that if it was woken up by the PMIC, that this was triggered from the accelerometer?

    Best regards,

    Edvin

  • Now I have one interrupt pin (INT2) connected to the nRF and the other (INT1) to the PMIC. The problem I've been having was even getting the accelerometer to wake up the nRF properly. Detecting the wake up reason is no issue.

  • Are you able to wake on a pin interrupt at all? Is the issue that the pin resets before the nRF54H20 is able to wake up? I don't think I understood the issue. 

    But if the PMIC wakes on INT1, couldn't this wake the nRF by powering it on?

    Best regards,

    Edvin

  • If the interrupt is latched and active low, it does not wake at all. When I measure the voltage level on the PMIC GPIO that the interrupt is connected to, it doesn't go low no matter how much I move the accelerometer.

    If the interrupt is latched and active high, the voltage level on the GPIO does go high upon movement, which enables BUCK1, which in turn wakes up the nRF5340. The problem there is that upon waking up, the nRF somehow clears the latched interrupt. This is seen as a negative edge on the PMIC GPIO and therefore BUCK1 is disabled again, cutting the power to the nRF.

    The PMIC is always awake, it's getting it to wake up the nRF and have the nRF stay awake that is tricky. 

    Again, I did find a solution that works but I'm curious why these methods (mostly the first using active low) fail.

    Best regards,

    Silvia

  • sillvi said:
    The problem there is that upon waking up, the nRF somehow clears the latched interrupt

    What latched interrupt? 

    sillvi said:
    This is seen as a negative edge on the PMIC GPIO and therefore BUCK1 is disabled again

    what GPIO is this? Is it the nRF disabling the BUCK1 on the PMIC?

    BR,

    Edvin

  • What latched interrupt? 

    The interrupt from the accelerometer when moving it

    what GPIO is this? Is it the nRF disabling the BUCK1 on the PMIC?

    It's a GPIO on the nPM1300. Yes, the nRF is the one disabling BUCK1 on the PMIC by calling

    regulator_disable().

    BR,

    Silvia

Reply Children
No Data
Related