Hello,
I've tested this example code
on two different MKR1310 boards.
3500 mAh 3.7V
I've also printed POWERON_CONFIG_REGISTER with
Serial.println(PMIC.readRegister(0x01),HEX);
which has a value of 0x1B, so CHG_CONFIG = 1 which means charger enabled
and
byte sysreg = PMIC.readSystemStatusRegister();
Serial.println(sysreg, HEX);
which is equal to 0x2B, so , CHRG_STAT[5:4] = 10 (Fast Charging).
Anyway I see CHARGER led (D2) on, while from datasheet it should be off while charging.
I'm referring to this datasheet: TI BQ24195
Do you know which could be the issue ?