I’ve noticed some unusual behaviour when I unplug my Boron from USB while it has a battery connected and while it is in hibernation mode.
Code is here if you want to look:
I have set up a battery charge mode, which shows battery state while charging on an epaper display. When charging is complete, it shows a battery charged image and then goes to hibernate mode. This seems to work properly.
I want to be able to unplug it and have it stay in hibernate mode until I push a power button, and then when I push the button I want it to start from a reset state.
However, when I unplug the USB cable, the Boron resets. Will a Boron always reset on USB connect and disconnect?
I currently have nothing connected to the pin I have assigned as the wake up pin.
There’s a second problem in that this line in my code isn’t working right:
if (System.powerSource() == POWER_SOURCE_BATTERY)
even when it is on battery power only, and the battery is directly connected to the ground and Li+ pins (no ammeter in series), that line seems to fail. I can’t debug this, because connecting the debugger and USB cable would make this line not do what I want.
The battery I’m using to test is this 18650:
It’s not a battery problem, I tested that cell in a flashlight and it works just fine for several hours.
Any suggestions would be appreciated,
Thanks!