nPM1300 does not exit ship hold mode when SHPHLD button pressed or VBUS connected

Hello,

I have custom hardware using an nPM1300 and nRF52840, and I am having trouble getting the nPM1300 to work as described in its documentation. I have a button connected between the SHPHLD pin and ground, and I can tell it is working because I get GPIO events, and a long press does reset the nPM1300. However, if I enable ship hold mode, then it does not exit ship hold mode with either a short press of the button or plugging in USB. I can only get it to exit with a long press.

You can see my hardware at kicanvas.org/?github=https%3A%2F%2Fgithub.com%2Fjoelspadin%2Fmarten_numpad%2Fblob%2Fmain%2Fpcb%2Fnumpad.kicad_pro. The relevant schematics are in usb.kicad_sch and numpad.kicad_sch.

I am using Zephyr 4.1. My devicetree setup for the nPM1300 looks like this:

&i2c0 {
    compatible = "nordic,nrf-twi";
    status = "okay";

    pinctrl-0 = <&i2c0_default>;
    pinctrl-1 = <&i2c0_sleep>;
    pinctrl-names = "default", "sleep";

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

        host-int-gpios = <&gpio0 30 0>;
        pmic-int-pin = <1>;
        long-press-reset = "one-button";

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

            main_regulator: BUCK2 {
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
                regulator-always-on;
            };
        };

        npm1300_charger: charger {
            compatible = "nordic,npm1300-charger";
            charging-enable;

            term-microvolt = <4150000>;
            term-warm-microvolt = <4000000>;
            current-microamp = <250000>;
            dischg-limit-microamp = <1000000>;
            vbus-limit-microamp = <500000>;

            // No thermistor
            thermistor-ohms = <0>;
            thermistor-beta = <3380>;
        };

        npm1300_leds: leds {
            compatible = "nordic,npm1300-led";
            nordic,led0-mode = "charging";
            nordic,led1-mode = "host";
            nordic,led2-mode = "host";
        };
    };
};

Using

    static struct gpio_callback event_cb;
    gpio_init_callback(&event_cb, power_button_callback, BIT(NPM1300_EVENT_SHIPHOLD_PRESS));
    mfd_npm1300_add_callback(pmic, &event_cb);

I have set up a callback which checks if USB is powered. If not, it blinks an LED a few times, then calls regulator_parent_ship_mode(). With the board powered only from a battery, when I press the button, the LED blinks, then it shuts off and the voltage to the SoC drops to 0 as expected. When I press the button again, nothing happens. (I can tell it is not waking, immediately triggering the GPIO event, and then going back into ship mode, because the LED does not blink.) Similarly, reconnecting USB power does not wake it either.

Is there something else I'm missing that needs to be configured?

  • The switch is the only thing connected to the SHPHLD pin. I do have an EK, so I can try to test the behavior there sometime tomorrow.

  • Using the EK with the nPM PowerUP app, pressing the button once does appear to wake it from ship mode. I haven't yet tried using the same code as on my custom board yet though.

    Assuming this is a hardware issue, are there any pins which, if shorted to one another and/or ground, might break the pull up from SHPHLD to VBAT (but only when in ship mode)? Or is it more likely that the chip was damaged during soldering?

    I have a microscope and camera, so I can provide pictures of the boards if that would be useful.

  • Usual suspects would be the adjacent pins, SCL and VSET2. Checking shorts between SHPHLD and these pins might reveal something.

  • No beeps from my multimeter in continuity mode on any of those pins, but I am reading a resistance in the megaohm range between SHPHLD and VSET2 if that means anything.

    SHPHLD to VSET2: ~5 MΩ

    SHPHLD to SCL: no resistance reading

    Edit: tried it again with something a bit nicer than a cheap, pocket multimeter, and it read ~5 MΩ instead of ~12 MΩ.

  • I finally took the time to clean up some of the solder blobs on another PCB, and it has the same issue.

    I know the PMIC reset button is being detected, because holding it for 10 seconds does reset the PMIC. However, still neither a short press of the button nor plugging in USB will wake it. Holding the button for 10 seconds is the only thing that wakes it.

    I measure the following voltages in each state:

    Ship hold mode
    Battery only
    Ship hold mode
    Battery + USB 
    After 10s press
    Battery only
    After 10s press
    Battery + USB
    VBUS 0 V 5 V 0 V 5 V
    VBAT 4.1 V 4.1 V 4.1 V 4.1 V
    PMIC VSYS 4.1 V 5 V 4.1 V 5 V
    PMIC VOUT2 < 10 mV < 10 mV 3.2 V 3.2 V
    PMIC SHPHLD 4.1 V 5 V 4.1 V 5 V

    Based on the fact that holding to reset does work, I'm guessing there is either a software issue with the Zephyr driver, or there's a hardware issue that somehow only affects the wake function and not the hard reset function?

Related