Skip to content

Commit 0708980

Browse files
committed
nicla-system: Fix incorrect INT disable.
1 parent 444a74d commit 0708980

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
@@ -115,10 +115,11 @@ bool nicla::enableCharge(uint8_t mA, bool disableNtc)
115115
// For very depleted batteries, set ULVO at the very minimum (2.2V) to re-enable charging
116116
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_ILIM_UVLO_CTRL, 0x3F);
117117

118-
// Disable TS and interrupt on charge
119118
_ntcEnabled = !disableNtc;
120119
if (!_ntcEnabled) {
121-
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_TS_CONTROL, 1 << 3);
120+
// Disable Temperature Sense (B7 = 0) and interrupt on charge status change (B3 = 0).
121+
// INT only shows faults and does not show charge status)
122+
_pmic.writeByte(BQ25120A_ADDRESS, BQ25120A_TS_CONTROL, 0);
122123
}
123124

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

0 commit comments

Comments
 (0)