Skip to content

Commit 38f8925

Browse files
seov-nordicjhedberg
authored andcommitted
drivers: mfd: npm13xx: add delay between timer strobing and hibernate
When using I2C clock frequency >= 250 kHz, it's been observed that the nPM1300 would unexpectedly wake up before requested time has expired. Add a delay between applying a new timer value and triggering hibernate to mitigate this. Signed-off-by: Sergei Ovchinnikov <[email protected]>
1 parent 6fe2465 commit 38f8925

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/mfd/mfd_npm13xx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ int mfd_npm13xx_hibernate(const struct device *dev, uint32_t time_ms)
273273
return ret;
274274
}
275275

276+
/* give nPM13xx time to load the timer value */
277+
k_msleep(1);
278+
276279
return mfd_npm13xx_reg_write(dev, NPM13XX_SHIP_BASE, SHIP_OFFSET_HIBERNATE, 1U);
277280
}
278281

0 commit comments

Comments
 (0)