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?

Parents
  • Hello,

    Is this behavior seen in multiple devices, or with just a single device? Just to check is this systematic issue and not a damaged PMIC or soldering problem for example.  

    Code itself seems to be ok, no issues seen with it. 

    Also the schematic looks ok.

    nPM1300 should wakeup when VBUS is present, so something seems to be off here. Have you measured VBAT and VBUS in this condition? What is the measured voltage at SHPHLD?

    Does the nPM1300 charge the battery and buck starts with correct voltage?

Reply
  • Hello,

    Is this behavior seen in multiple devices, or with just a single device? Just to check is this systematic issue and not a damaged PMIC or soldering problem for example.  

    Code itself seems to be ok, no issues seen with it. 

    Also the schematic looks ok.

    nPM1300 should wakeup when VBUS is present, so something seems to be off here. Have you measured VBAT and VBUS in this condition? What is the measured voltage at SHPHLD?

    Does the nPM1300 charge the battery and buck starts with correct voltage?

Children
  • On this one board:

    Voltage Ship mode Ship mode Normal mode Normal mode
    USB connected USB disconnected USB connected USB disconnected
    VBUS 4.9 V 0 V 4.9 V 0 V
    VBAT 4.13 V 4.0 V 4.13 V 4.0 V
    SHPHLD (at switch) 4.9 V -30 mV 4.9 V 4.0 V
    BUCK2 output 2 mV 9 mV 3.2 V 3.2 V
    Charge LED Off Off On Off

    Everything looks correct to me when not in ship mode, and all the voltages look correct when in ship mode with USB connected (it even looks like it is charging the battery despite the charge LED being off), however SHPHLD doesn't seem to be getting pulled up to the battery voltage when in ship mode and USB is disconnected.

    I do have a few more boards. I can check if they behave the same way sometime later.

  • On a second board, it does wake from ship mode when plugging in USB. However, pressing the SHPHLD button still does not work to wake it. When on battery power and in ship mode, I still see ~0 V on the SHPHLD pin, just like with the first board.

    I had five boards assembled for me by PCBWay, so I have three more I could test, however there is excessive solder on some of the pins of the nPM1300 on the remaining three (including two bridged pins on one of them). I will need to do some rework to remove the solder blobs before I can test those.

  • Another oddity I noticed: on this second board (where plugging in USB wakes it from ship mode, but pressing the button does not), if I read the value of SENSOR_CHAN_NPM1300_CHARGER_STATUS from the charger, bit 0 (battery detected) is only 1 whenever USB is plugged in. As soon as I unplug USB, it starts reporting that the battery is not connected. Is that expected?

    If that is not expected, it could point towards some issue with the same area that's responsible for pulling up SHPHLD to VBAT while in ship mode?

  • Hi Joel,

    Yes the SHPHLD should be pulled to VBAT in ship mode though the internal pull-up resistor. Just to confirm that nothing else is connected to the SHPHLD pin other than the switch? If the voltage is already at 0V then device cannot detect the falling edge and cannot wakeup from sleep.

    The battery detection is disabled in the latest revision of the silicon and the behavior you see is as expected. You can see details here, item #36 PCN213 v1.1 for nPM1300-CAAA and nPM1300-QEAA

    Btw do you have nPM1300-EK that you could use as a reference for the testing?

  • 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.

Related