My board has a Li-ion battery with the capacity of 2200mAh and maximum voltage of 4.25V and minimum voltage of 3V . This means that the battery voltage shouldn't get lower than 3V. Microcontroller is powered through a low dropout 3.3v regulator.
The micro should be apprised of the lowness of the battery when the battery voltage is approaching 3V (0.2 volts higher than the minimum voltage for example) and then shut down itself to avoid battery discharge.
There is a charging circuit which is powered by 5V. When power is connected it powers on the micro as well.
How to disconnect the microntroller from the battery and keep it disconnected until 5v power is back? Controller has voltage measurement built-in and can send a signal just before to go off.