The energy spectra of galactic cosmic rays carry fundamental information regarding their origin and propagation, but, near Earth,
cosmic rays are significantly affected by the solar magnetic field which changes over time. The time dependence of proton and electron spectra were measured from July 2006 to December 2009 by PAMELA experiment, that is a ballooon-borne experiment collecting data since 15 June 2006.
These studies allowed to obtain a more complete description of the cosmic radiation, providing fundamental information about the transport and modulation of cosmic rays inside the heliosphere. In this talk the study of the time dependence of the cosmic-ray protons and helium nuclei from the unusual 23rd solar minimum through the following period of solar maximum activity is presented.