We study a driven two-state system interacting with a generic structured environment. We outline the derivation of the time-local microscopic non-Markovian master equation, in the limit of weak coupling between the system and the reservoir, and we derive its analytic solution for general reservoir spectra in the regime of validity of the secular approximation. We also consider the non-Markovian master equation without the secular approximation and study the effect of nonsecular terms on the system dynamics for two classes of reservoir spectra: the Ohmic and the Lorentzian reservoir. Finally, we derive the analytic conditions for complete positivity of the dynamical map, with and without the secular approximation. Interestingly, the complete positivity conditions have a transparent physical interpretation in terms of the characteristic time scales of phase diffusion and relaxation processes.