nPM1300EK event callback not firing SPHHLD

Hello,

I am using the nPM1300EK connected to a nRF54H20 DK over i2c interface. I am trying out the "one button" sample code (https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/pmic/native/npm1300_one_button/README.html).

The communication is working (I can see the nPM1300's LED flashing) but the event_callback is not triggered when I press the SHPHLD button. I can see that it goes from 5V to 0V, but the callback does not seem to be working. I am using the sample code as it is except from the overlay for the nRF54DK

What can I try to make it work?

  • Hi

    Which version of the SDK and the 54h20dk are you using?

    Try to add this into your overlay

    &i2c135 {
      memory-regions = <&cpuapp_dma_region>;
    };

    Regards

    Runar

  • Hi,

    I am using SDK 2.7.0 (experimental) and the board is the PCA1075 0.8.0. Just in case, the overlay is as below... I already have that memory region assigned to dma.

    How is this supposed to work if the IRQ pin is not connected? Is the driver constantly polling for changes in the SHPHLD pin state?

    #include <dt-bindings/regulator/npm1300.h>
    #include <zephyr/dt-bindings/input/input-event-codes.h>

    &pinctrl {
      i2c132_default: i2c132_default {
        group1 {
          psels = <NRF_PSEL(TWIM_SCL, 0, 1)>,
                  <NRF_PSEL(TWIM_SDA, 0, 4)>;
          bias-pull-up;
        };
      };
      i2c132_sleep: i2c132_sleep {
        group1 {
          psels = <NRF_PSEL(TWIM_SCL, 0, 1)>,
                  <NRF_PSEL(TWIM_SDA, 0, 4)>;
          low-power-enable;
        };
      };
    };

    &i2c132 {
      status = "okay";
      pinctrl-0 = <&i2c132_default>;
      pinctrl-1 = <&i2c132_sleep>;
      pinctrl-names = "default", "sleep";
      clock-frequency = <I2C_BITRATE_STANDARD>;
      memory-regions = <&cpuapp_dma_region>;

      npm1300_ek_pmic: pmic@6b {
        compatible = "nordic,npm1300";
        reg = <0x6b>;

        npm1300_ek_gpio: gpio-controller {
          compatible = "nordic,npm1300-gpio";
          gpio-controller;
          #gpio-cells = <2>;
          ngpios = <5>;
        };

        npm1300_ek_regulators: regulators {
          compatible = "nordic,npm1300-regulator";

          // limits are set to min/max allowed values
          npm1300_ek_buck1: BUCK1 {
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <3300000>;
          };

          npm1300_ek_buck2: BUCK2 {
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <3300000>;
          };

          npm1300_ek_ldo1: LDO1 {
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <3300000>;
          };

          npm1300_ek_ldo2: LDO2 {
            regulator-min-microvolt = <1000000>;
            regulator-max-microvolt = <3300000>;
          };
        };

        npm1300_ek_charger: charger {
          compatible = "nordic,npm1300-charger";
          term-microvolt = <4150000>;
          term-warm-microvolt = <4000000>;
          current-microamp = <150000>;
          dischg-limit-microamp = <1000000>;
          vbus-limit-microamp = <500000>;
          thermistor-ohms = <10000>;
          thermistor-beta = <3380>;
          charging-enable;
        };

        npm1300_ek_buttons: buttons {
          compatible = "gpio-keys";
          pmic_button0: pmic_button_0 {
            gpios = <&npm1300_ek_gpio 0 GPIO_ACTIVE_HIGH>;
            label = "Pmic button switch 0";
            zephyr,code = <INPUT_KEY_0>;
          };
        };

        npm1300_ek_leds: leds {
          compatible = "nordic,npm1300-led";
          nordic,led0-mode = "error";
          nordic,led1-mode = "charging";
          nordic,led2-mode = "host";
        };
      };
    };
  • Thanks for posting the overlay. I am setting it up on my side to see if I can replicate it. It seems to me like there are something missing from the overlay when I compare it to other overlays. I see no reference to any interrupt pin 

    &npm1300_ek_pmic {
       host-int-gpios = <&gpio0 10 0>;
       pmic-int-pin = <3>;
    };

    Like this. I will get back to you tomorrow

    Nb: Is your DK externally powered? if so when using a separately powered development kit, you must restart the application to reconfigure the nPM1300 after exiting ship mode or long press reset.

    Regards

    Runar

  • Yes, I am powering the nRF54 DK through the USB port but SPHHLD pin feature is just an example, I would like that event_callback to trigger so I can see events from the nPM1300 can be received on the nRF54...

    It is true that I have no int gpio defined in the overlay but I could not find that was needed in the overlay files and I could find any way to connect to nPM1300's INT pin either. What sample code are you referring to?

  • leomarhor_uy said:

    Yes, I am powering the nRF54 DK through the USB port but SPHHLD pin feature is just an example, I would like that event_callback to trigger so I can see events from the nPM1300 can be received on the nRF54...

    Thanks, I suspect non of the events can trigger. 

    leomarhor_uy said:
    What sample code are you referring to?

    I was looking at the other overlays for the different boards 

    runsiv said:
    &npm1300_ek_pmic {
       host-int-gpios = <&gpio0 10 0>;
       pmic-int-pin = <3>;
    };

    All interrupts/events is shared on one pin as mentioned here  npm1300 interrupts 

    I tested on my board by adding the  line over. But I ran into some issue and have reached out to the PMIC team and will update when I have something new

    Regards

    Runar

Related