nPM PowerUp Overlay generation

Hi,

I'm currently using nPM PowerUp(version 2.0.0) to generate the nPM1300 configuration.

I noticed that in the generated overlay the GPIOs configuration is missing.

For example, in nPM PowerUp, I configured GPIO1 as output interrupt but the associated configuration is not generated in the overlay. 

Is this the expected behavior ?

Best regards,

Mehdi

Parents
  • Hello Mehdi,

     nPM PowerUP application is designed to generate a devicetree overlay file that reflects the configuration set in its GUI, which can then be used in your project to initialize the nPM1300 features via Zephyr driver ((+) Extend battery life and add USB-C charging with the nPM1300 - Blogs - Nordic Blog - Nordic DevZone

    ''For example, in nPM PowerUp, I configured GPIO1 as output interrupt but the associated configuration is not generated in the overlay''  which samples you are working on and which board is connected to nPM1300? I think to connect the GPIO output of PMIC to the GPIO pin of connected board. you have to mention this in the overlay file.

    For example, the following overlay is from npm1300_one_button sample. 

    /*
     * Copyright (c) 2023 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */
    
    #include <dt-bindings/regulator/npm1300.h>
    
    &i2c0_default {
    	group1 {
    		bias-pull-up;
    	};
    };
    
    &npm1300_ek_ldo1 {
    	regulator-initial-mode = <NPM1300_LDSW_MODE_LDSW>;
    };
    
    &npm1300_ek_pmic {
    	host-int-gpios = <&gpio1 12 0>;
    	pmic-int-pin = <3>;
    };
    
     

    GPIO1 (P1.12) on the nRF52840 is connected to GPIO3 on the nPM1300. This connection is used for the nPM1300 to signal interrupts (such as button events) to the nRF52840 host MCU. This overlay configures the connection, so the firmware knows which pin to monitor for PMIC events.

    Thanks.

    BR

    Kazi

     

  • Hello Kazi,

    I'm connecting the nPM1300EK to an nRF53DK.

    I tested the two available samples (one button and fuel_gauge), they work as expected.

    I made a custom configuration using nPM PowerUp (please look at the attached json file and overlay file)

    in the GUI(json) configuration, GPIO0 is set as power loss warning and GPIO1 is set as output interrupt

    But in the overlay file, both pins are not configured.

    The line  pmic-int-pin = <1>; is missing.

    I understand that I have to manually configure the GPIOs on the nRF53 side.

    but I was expecting that the nPM1300 overlay would have the configuration for the PMIC GPIOs generated from the GUI.

    {
      "boosts": [],
      "charger": {
        "vTerm": 4.2,
        "vTrickleFast": 2.9,
        "iChg": 100,
        "enabled": true,
        "iTerm": "10%",
        "iBatLim": 1340,
        "enableRecharging": true,
        "enableVBatLow": true,
        "ntcThermistor": "10 kΩ",
        "ntcBeta": 3380,
        "tChgStop": 110,
        "tChgResume": 100,
        "vTermR": 3.6,
        "tCold": 0,
        "tCool": 10,
        "tWarm": 45,
        "tHot": 60
      },
      "bucks": [
        {
          "vOutNormal": 1.8,
          "vOutRetention": 1,
          "mode": "vSet",
          "modeControl": "Auto",
          "onOffControl": "Off",
          "retentionControl": "Off",
          "enabled": true,
          "activeDischarge": false
        },
        {
          "vOutNormal": 1,
          "vOutRetention": 1,
          "mode": "vSet",
          "modeControl": "Auto",
          "onOffControl": "Off",
          "retentionControl": "Off",
          "enabled": false,
          "activeDischarge": false
        }
      ],
      "ldos": [
        {
          "voltage": 1.8,
          "enabled": true,
          "mode": "Load_switch",
          "softStartEnabled": true,
          "softStart": 10,
          "activeDischarge": false,
          "onOffControl": "SW"
        },
        {
          "voltage": 1,
          "enabled": false,
          "mode": "Load_switch",
          "softStartEnabled": true,
          "softStart": 20,
          "activeDischarge": false,
          "onOffControl": "SW"
        }
      ],
      "gpios": [
        {
          "mode": 7,
          "pull": 1,
          "pullEnabled": false,
          "drive": 1,
          "driveEnabled": true,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": false
        },
        {
          "mode": 5,
          "pull": 1,
          "pullEnabled": false,
          "drive": 1,
          "driveEnabled": true,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": false
        },
        {
          "mode": 0,
          "pull": 1,
          "pullEnabled": true,
          "drive": 1,
          "driveEnabled": false,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": true
        },
        {
          "mode": 0,
          "pull": 1,
          "pullEnabled": true,
          "drive": 1,
          "driveEnabled": false,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": true
        },
        {
          "mode": 0,
          "pull": 1,
          "pullEnabled": true,
          "drive": 1,
          "driveEnabled": false,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": true
        }
      ],
      "leds": [
        {
          "mode": "Charging"
        },
        {
          "mode": "Not used"
        },
        {
          "mode": "Charger error"
        }
      ],
      "pof": {
        "enable": true,
        "threshold": 2.9,
        "polarity": "Active high"
      },
      "lowPower": {
        "timeToActive": "1008",
        "invPolarity": true
      },
      "reset": {
        "longPressReset": "one_button"
      },
      "timerConfig": {
        "mode": "0",
        "prescaler": "Slow",
        "period": 0
      },
      "fuelGaugeSettings": {
        "enabled": true,
        "chargingSamplingRate": 500
      },
      "firmwareVersion": "1.2.4+0",
      "deviceType": "npm1300",
      "usbPower": {
        "currentLimiter": 0.5
      },
      "fileFormatVersion": 2
    }
    config.overlay

    Best regards,

    Mehdi

Reply
  • Hello Kazi,

    I'm connecting the nPM1300EK to an nRF53DK.

    I tested the two available samples (one button and fuel_gauge), they work as expected.

    I made a custom configuration using nPM PowerUp (please look at the attached json file and overlay file)

    in the GUI(json) configuration, GPIO0 is set as power loss warning and GPIO1 is set as output interrupt

    But in the overlay file, both pins are not configured.

    The line  pmic-int-pin = <1>; is missing.

    I understand that I have to manually configure the GPIOs on the nRF53 side.

    but I was expecting that the nPM1300 overlay would have the configuration for the PMIC GPIOs generated from the GUI.

    {
      "boosts": [],
      "charger": {
        "vTerm": 4.2,
        "vTrickleFast": 2.9,
        "iChg": 100,
        "enabled": true,
        "iTerm": "10%",
        "iBatLim": 1340,
        "enableRecharging": true,
        "enableVBatLow": true,
        "ntcThermistor": "10 kΩ",
        "ntcBeta": 3380,
        "tChgStop": 110,
        "tChgResume": 100,
        "vTermR": 3.6,
        "tCold": 0,
        "tCool": 10,
        "tWarm": 45,
        "tHot": 60
      },
      "bucks": [
        {
          "vOutNormal": 1.8,
          "vOutRetention": 1,
          "mode": "vSet",
          "modeControl": "Auto",
          "onOffControl": "Off",
          "retentionControl": "Off",
          "enabled": true,
          "activeDischarge": false
        },
        {
          "vOutNormal": 1,
          "vOutRetention": 1,
          "mode": "vSet",
          "modeControl": "Auto",
          "onOffControl": "Off",
          "retentionControl": "Off",
          "enabled": false,
          "activeDischarge": false
        }
      ],
      "ldos": [
        {
          "voltage": 1.8,
          "enabled": true,
          "mode": "Load_switch",
          "softStartEnabled": true,
          "softStart": 10,
          "activeDischarge": false,
          "onOffControl": "SW"
        },
        {
          "voltage": 1,
          "enabled": false,
          "mode": "Load_switch",
          "softStartEnabled": true,
          "softStart": 20,
          "activeDischarge": false,
          "onOffControl": "SW"
        }
      ],
      "gpios": [
        {
          "mode": 7,
          "pull": 1,
          "pullEnabled": false,
          "drive": 1,
          "driveEnabled": true,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": false
        },
        {
          "mode": 5,
          "pull": 1,
          "pullEnabled": false,
          "drive": 1,
          "driveEnabled": true,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": false
        },
        {
          "mode": 0,
          "pull": 1,
          "pullEnabled": true,
          "drive": 1,
          "driveEnabled": false,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": true
        },
        {
          "mode": 0,
          "pull": 1,
          "pullEnabled": true,
          "drive": 1,
          "driveEnabled": false,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": true
        },
        {
          "mode": 0,
          "pull": 1,
          "pullEnabled": true,
          "drive": 1,
          "driveEnabled": false,
          "openDrain": false,
          "openDrainEnabled": true,
          "debounce": false,
          "debounceEnabled": true
        }
      ],
      "leds": [
        {
          "mode": "Charging"
        },
        {
          "mode": "Not used"
        },
        {
          "mode": "Charger error"
        }
      ],
      "pof": {
        "enable": true,
        "threshold": 2.9,
        "polarity": "Active high"
      },
      "lowPower": {
        "timeToActive": "1008",
        "invPolarity": true
      },
      "reset": {
        "longPressReset": "one_button"
      },
      "timerConfig": {
        "mode": "0",
        "prescaler": "Slow",
        "period": 0
      },
      "fuelGaugeSettings": {
        "enabled": true,
        "chargingSamplingRate": 500
      },
      "firmwareVersion": "1.2.4+0",
      "deviceType": "npm1300",
      "usbPower": {
        "currentLimiter": 0.5
      },
      "fileFormatVersion": 2
    }
    config.overlay

    Best regards,

    Mehdi

Children
No Data
Related