Connecting the npm1300 to a custom board

Good Day.

I'm trying to run the "npm1300_fuel_gauge" example on a custom board (nRF52840), but I'm getting errors that I don't know how to fix. 

The first thing I did was to get the PMIC configuration overlay file (config.overlay) through nPM PowerUP. Then I transferred the code from config.overlay to the custom board device tree file (custom_board_nrf52840.dts). I plan to connect the PMIC via I2C1. 

custom_board_nrf52840.dts -->

custom_board_nrf52840-pinctrl.dtsi -->

The following errors occur in the .dts file (see screenshot).

I know that these values should be taken from the "fuel_gauge.h" file, but that doesn't happen for some reason.

I see an error in the prj.conf file too (see screenshot). 

When building the project, I see the following information -->

I have not changed the CMakeLists.txt files. 

Can you please tell me where I am making a mistake when transferring this example to my custom board?

Thank you.

  • Yes, that's what I wanted to know.

    But with this approach, I can never get to the point where charging stops as soon as the algorithm determines the charge level to be 100%.

    Let me give you an example.

    I have a device that shows the charge level on the display in % (according to the fuel_gauge algorithm), and a LED (CHG) whose state depends on the algorithm of the PMIC itself. 

    And I constantly have the situation that the display shows 100% charge level, but the CHG LED does not go to off state because I(TERM) is still too high for the PMIC to finish charging. And this behavior of the device can be misleading for the end user, as he will not know which indicator to trust (LED or display).

    I played around with the parameters in the overlay file (charge current and voltage), but I never managed to achieve a situation where the display shows 100% and the CHG LED turns off at the same time. Either 100% on the display and the LED is still on, or charging is turned off (LED turns off) but the algorithm shows less than 100% on the display.

    Anyway, thanks Sigurd for your patience and help, you can consider this ticket closed as the existing problem is beyond the scope of this ticket.

1 2 3 4 5