Go Down

Topic: charging while asleep (Read 387 times) previous topic - next topic

lavignema

I've got a tough one for the group this time. Yea, I know I've had more than my share of newbie moron questions but this time it is different.

I'm trying to figure out how to enable the charger to continue charging the battery while the Arduino is in sleep mode. I'm using the ArduinoLowPower.h library to put the chip to sleep and it works great.

There is a line of code in the CPP file: SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
Can someone please tell me what these commands mean and where can I affect what appears to be the sleep mask?

 Is there documentation on how to use the I2C interface to affect the charging chip? Specifically it looks like I need to set the chip into autonomous mode during my sleep routine and then return it to normal upon waking. Reg09[7] switches between Autonomous Mode and Host Mode. It looks like I just need to write a 1 to this register unless the sleep routine actually shuts down the charger chip

Any help is greatly appreciated.

lavignema

Well, I emailed Arduino technical support and I got a reply. They suggested that I post my problem/request in this forum so the answer would benefit the community. I suggested that they reply with my answer to my post in their forum. Still hoping they will. In the mean time though...

I studied the behavior of the charger more carefully. I compared charging activity after returning from sleep when plugged in and not plugged in. It seems that there is a minor burst of charger activity after waking while plugged in but a MAJOR burst of activity after waking while running on battery power.

The conclusion I have reached is that you can put this MKR board to sleep and still expect the charger to maintain a full charge on your battery.

Go Up