This paper analyzes and simulates the Li-ion battery charging process for a solar powered battery management system. The battery is charged using a non-inverting synchronous buck-boost DC/DC power converter. The system operates in buck, buck-boost, or boost mode, according to the supply voltage conditions from the solar panels. Rapid changes in atmospheric conditions or sunlight incident angle cause supply voltage variations. This study develops an electrochemical-based equivalent circuit model for a Li-ion battery. A dynamic model for the battery charging process is then constructed based on the Li-ion battery electrochemical model and the buck-boost power converter dynamic model. The battery charging process forms a system with multiple interconnections. Characteristics, including battery charging system stability margins for each individual operating mode, are analyzed and discussed. Because of supply voltage variation, the system can switch between buck, buck-boost, and boost modes. The system is modeled as a Markov jump system to evaluate the mean square stability of the system. The MATLAB based Simulink piecewise linear electric circuit simulation tool is used to verify the battery charging model.