[nRF5340/nPM1304] Fail to configure PMIC charge current

Hi,

What specific steps must be followed to modify the charging current (BCHGISET) of the nPM1304?

The information I found says to disable the charger first (set BCHGENABLECLR to 0x01), then set BCHGISET, and finally enable the charger (set BCHGENABLESET to 0x01).

However, after following this method, although the write operation was successful, I found that the charging current of the nPM1304 is not the current I want, but is around 32mA, which is the same as the default charging current of the nPM1300.

Before disabling the charger, I read the register value as 0x01, and after writing 0x01, I read the value as 0x00, so I think the setting was successful. Could I have missed something or made a mistake in the steps?





Thank you very much for your help!

Best regards,
Kevin

Parents
  • Hello Kevin,

    I have following explanation from team.

    By "measuring the charging current" we actually mean using an external ampere-meter to check the actual current flowing into and out of the battery.

    The problem with reading the ADC (or the Zephyr npm13xx sensor driver) value is that it, unfortunately, doesn't take the actual charging current setting into account when calculating the return value. In Zephyr, the current range is taken from the Device Tree setting. It uses the DTS setting `current-microamp` for calculating the "full scale" value which it uses to then calculate the current measured by the ADC. When the charging current is changed by direct register writes, the sensor driver is not aware of this, so it keeps showing the same value due to the same "full scale" value.

    Hopefully, this makes it clear. 

Reply
  • Hello Kevin,

    I have following explanation from team.

    By "measuring the charging current" we actually mean using an external ampere-meter to check the actual current flowing into and out of the battery.

    The problem with reading the ADC (or the Zephyr npm13xx sensor driver) value is that it, unfortunately, doesn't take the actual charging current setting into account when calculating the return value. In Zephyr, the current range is taken from the Device Tree setting. It uses the DTS setting `current-microamp` for calculating the "full scale" value which it uses to then calculate the current measured by the ADC. When the charging current is changed by direct register writes, the sensor driver is not aware of this, so it keeps showing the same value due to the same "full scale" value.

    Hopefully, this makes it clear. 

Children
No Data
Related