nPM1300 startup current too low via usb

Hi. 

I am currently working on a project using the nPM1300 as a pmic.

For this i have a battery and an nrf5340 connected to it.
Using zephyr i have even the following options enabled:

CONFIG_I2C=y
CONFIG_REGULATOR=y
CONFIG_MFD_NPM13XX_INIT_PRIORITY=51
CONFIG_REGULATOR_NPM13XX_COMMON_INIT_PRIORITY=52


as well as a kind of working device tree:
&i2c0 {
  compatible = "nordic,nrf-twim";
  status = "okay";

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

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

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

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

      npm1300_buck1: BUCK1 {
        regulator-min-microvolt = <1000000>;
        regulator-max-microvolt = <3300000>;
        regulator-init-microvolt = <2700000>;
        retention-microvolt = <1000000>;
      };

      npm1300_buck2: BUCK2 {
        regulator-min-microvolt = <1000000>;
        regulator-max-microvolt = <3300000>;
        regulator-init-microvolt = <3300000>;
        retention-microvolt = <1800000>;
      };

      npm1300_ldo1: LDO1 {
        regulator-min-microvolt = <1000000>;
        regulator-max-microvolt = <3300000>;
        regulator-init-microvolt = <3300000>;
        regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;

        regulator-boot-on;
      };

      npm1300_ldo2: LDO2 {
        regulator-min-microvolt = <1000000>;
        regulator-max-microvolt = <3300000>;
        regulator-init-microvolt = <2500000>;
        regulator-initial-mode = <NPM13XX_LDSW_MODE_LDO>;

        regulator-boot-on;
      };
    };
    npm1300_charger: charger {
      compatible = "nordic,npm1300-charger";
    term-microvolt = <3600000>;
    term-warm-microvolt = <3600000>;
    // term-current-percent = <10>;
    current-microamp = <32000>;
    // trickle-microvolt = <2900000>;
    dischg-limit-microamp = <1000000>;
    vbus-limit-microamp = <500000>;
    thermistor-ohms = <10000>;
    thermistor-beta = <3380>;

    charging-enable;
    };

    npm1300_buttons: buttons {
      compatible = "gpio-keys";

      pushbutton: pushbutton {
        gpios = <&npm1300_gpio 0 GPIO_ACTIVE_HIGH>;
        label = "Pmic button switch 0";
        zephyr,code = <INPUT_KEY_0>;
      };
    };
  };


My issue is now the following. I want to be able to start my Board without having a Battery/Powersupply connected. Just using USB Power. 
Right now i have the nrf5340 connected to VSYS, but that is running into issues. Because i am unable to program the OTP section, so that its per default allowing 500mA of power via the USB interface.

My nrf never starts and it just stays offline. If I have it connected via a powersupply/Battery during startup, and connect usb then, I can still remove the power and keep it running via usb.

How can i make it so that my nrf sets the correct settings for the npm1300? And also as earyl as possible
Or do i need a need hardware revision for my pcb?



  • Hello Paul,

    Using zephyr i have even the following options enabled:

    Just to make thing 100% clear, are you using the nRF Connect SDK as well, or were you thinking of using vanilla zephyr? And what SDK version?

    Though this does look very similar to this previous problem. Unfortunately the default current limit is set to 100mA and until you have set it higher with SW you cannot draw 200mA from USB. Somehow you need to limit the inrush current and maybe figure out is there a way to not turn on everything at once. 

    Regards,

    Elfving

  • Yes i am using the latest nrf sdk using vscode. Versio 3.1.0

    I am currently trying to achieve that, i also helpfully was able to reduce the startup time for the pmic even more using these options:

    CONFIG_I2C=y
    CONFIG_REGULATOR=y
    CONFIG_I2C_INIT_PRIORITY=39
    CONFIG_MFD_NPM13XX_INIT_PRIORITY=40
    CONFIG_REGULATOR_NPM13XX_COMMON_INIT_PRIORITY=41
    CONFIG_REGULATOR_NPM13XX_INIT_PRIORITY=42
    CONFIG_SENSOR=y # enables the charger of the pmic part


    And doing some changes to the pcb helped in spreading the startup load. But I am still searching for a way to change the OTP bits.

    Can i reprogram them myself, so that the device per default trys to pull 500mA?
    Can i buy already programmed parts somewhere?

  • donpavlov said:
    And doing some changes to the pcb helped in spreading the startup load. But I am still searching for a way to change the OTP bits.

    You can do this by writing to the VBUSINILIMSTARTUP register, like what was suggested in that other ticket I linked to. Though I see the challenge here, it sounds like you would need an alternate way to power the board during bring-up/testing.

    Just had a talk with the relevant R&D team about this as well, just to confirm:

    It used to be 500 by default but was later changed to 100 mA. Unfortunately, there is no way to change OTP for customers. All devices come with the default of 100 mA now, so no opportunity to buy a "different OTP" device either. All they can do is avoid powering parts of the system on start up, let the SoC configure required current limit and then enable more rails. Or always have a non-empty battery to supply the overdraw of the system before the limit is configured

    Regards,

    Elfving

  • So writing to VBUSINLIMSTARTUP once should be enough to set the voltage to a different setting for every next upcoming reboot?
    Or will that register still be reset to the default 100mA after beeing powered off?

    So far my Team has been working on changing the Hardware Layout so that not everything is powered up at startup. And booting with a battery or powersupply attached is possible during development until then.

  • I had a talk with the relevant team about this, and I am sorry to say that registers customer can write are volatile memory and will be erased on power cycle or reset. I am sorry if I gave opposite impression.

    It sounds like changing the layout, or how you are powering the device is the only solution then.

    Regards,

    Elfving

Related