Skip to content

Commit 1ce192d

Browse files
committed
nicla-system: Fix incorrect INT disable.
1 parent c08b719 commit 1ce192d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libraries/Nicla_System/src/Nicla_System.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ bool nicla::enableCharge(uint8_t mA, bool disableNtc)
118118
// For very depleted batteries, set ULVO at the very minimum (2.2V) to re-enable charging
119119
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_ILIM_UVLO_CTRL, 0x3F);
120120

121-
// Disable TS and interrupt on charge
122121
_ntcEnabled = !disableNtc;
123122
if (!_ntcEnabled) {
124-
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_TS_CONTROL, 1 << 3);
123+
// Disable Temperature Sense (B7 = 0) and interrupt on charge status change (B3 = 0).
124+
// INT only shows faults and does not show charge status)
125+
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_TS_CONTROL, 0);
125126
}
126127

127128
// also set max battery voltage to 4.2V (VBREG)

0 commit comments

Comments
 (0)