Skip to content

Commit a4b8cbb

Browse files
committed
Changed MKRGSM1400 variant to increase the reliability
Changed input source control register value to avoid module's hung due to discharge peak this change increase the reliability of the SARA when 2G band's are used
1 parent 5c4d667 commit a4b8cbb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

variants/mkrgsm1400/variant.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,21 @@ SERCOM sercom5(SERCOM5);
185185
#define PMIC_REG01 0x01
186186
#define PMIC_REG07 0x07
187187

188+
#define PMIC_REG00 0x00
189+
190+
static inline void set_pmic_isc_register() {
191+
PERIPH_WIRE.initMasterWIRE(100000);
192+
PERIPH_WIRE.enableWIRE();
193+
pinPeripheral(PIN_WIRE_SDA, g_APinDescription[PIN_WIRE_SDA].ulPinType);
194+
pinPeripheral(PIN_WIRE_SCL, g_APinDescription[PIN_WIRE_SCL].ulPinType);
195+
196+
PERIPH_WIRE.startTransmissionWIRE( PMIC_ADDRESS, WIRE_WRITE_FLAG );
197+
PERIPH_WIRE.sendDataMasterWIRE(PMIC_REG00);
198+
PERIPH_WIRE.sendDataMasterWIRE(0x06);
199+
200+
PERIPH_WIRE.disableWIRE();
201+
}
202+
188203
static inline void enable_battery_charging() {
189204
PERIPH_WIRE.initMasterWIRE(100000);
190205
PERIPH_WIRE.enableWIRE();
@@ -229,6 +244,7 @@ void initVariant() {
229244
if (batteryPresent) {
230245
enable_battery_charging();
231246
}
247+
set_pmic_isc_register();
232248
disable_battery_fet(!batteryPresent);
233249
#endif
234250

0 commit comments

Comments
 (0)