  We investigate the generation of seed magnetic field through the Chern-Simons
coupling between the U(1) gauge field and an axion field that commences to
oscillate at various epoch, depending on the mass scale. We address axions
which begin oscillation during inflation, reheating, and also the radiation
dominated era after the thermalization of the Universe. We study the resonant
generation mechanisms and highlight that a small oscillation time scale with
respect to that of the cosmic expansion can lead to an efficient generation of
(hyper) magnetic field via resonant generation, even for ${\cal O}(1)$
coupling. In addition, we demonstrate that the generated field can be helical
due to the tachyonic amplification phase prior to the onset of oscillation.
Furthermore, it is shown that the parametric resonance during reheating can
generate a circularly polarized (hyper) magnetic field in a void region with
the present amplitude $B_0 =3\times 10^{-15}$Gauss and the coherent length
$\lambda_0 = 0.3$pc without being plagued by the backreaction issue.
