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?

  • Update: 

    Try the following overlay: Note that I have wired GPIO 3 on the EK to port 0 pin 5 on the DK

    // To get started, press Ctrl+Space to bring up the completion menu and view the available nodes.
    
    // You can also use the buttons in the sidebar to perform actions on nodes.
    // Actions currently available include:
    
    // * Enabling / disabling the node
    // * Adding the bus to a bus
    // * Removing the node
    // * Connecting ADC channels
    
    // For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
    // You can also visit the nRF DeviceTree extension documentation at https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/guides/ncs_configure_app.html#devicetree-support-in-the-extension
    
    #include <dt-bindings/regulator/npm1300.h>
    
    #include <zephyr/dt-bindings/input/input-event-codes.h>
    
    
    
    // &npm1300_ek_pmic {
    // 	host-int-gpios = <&gpio0 5 0>;
    // 	pmic-int-pin = <3>;
    // };
    
    
    
    &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>;
      zephyr,concat-buf-size = <40>;
    
    
     
    
      npm1300_ek_pmic: pmic@6b {
    
        compatible = "nordic,npm1300";
    
        reg = <0x6b>;
        host-int-gpios = <&gpio0 5 0>;
    	pmic-int-pin = <3>;
    
    
    
        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";
    
        };
    
      };
    
    };

    boards/extensions/nrf54h20dk/nrf54h20dk_nrf54h20_cpuapp.overlay 

    
    
    
    &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;
      
          };
      
        };
      
      };
      
    
    
    
    
    
    arduino_i2c: &i2c132 {
    	compatible = "nordic,nrf-twim";
    	
        pinctrl-0 = <&i2c132_default>;
    
        pinctrl-1 = <&i2c132_sleep>;
    	pinctrl-names = "default", "sleep";
    };
    

    I have tested this on my part and it works. The default nrfx_twim concatenation buffer is too small to handle the I2C activity that happens when an nPM1300 interrupt appears. I had to add the part with 

    zephyr,concat-buf-size = <40>; 
    and the host &pmic int pin
    Regards

    Runar

  • Great to hear it, don't hesitate to open new tickets in the future if you have any questions

    Regards

    Runar

Related