  In this work we consider a two-dimensional piecewise smooth system, defined
in two domains separated by the switching manifold $x=0$. We assume that there
exists a piecewise-defined continuous Hamiltonian that is a first integral of
the system. We also suppose that the system possesses an invisible fold-fold at
the origin and two heteroclinic orbits connecting two hyperbolic critical
points on either side of $x=0$. Finally, we assume that the region closed by
these heteroclinic connections is fully covered by periodic orbits surrounding
the origin, whose periods monotonically increase as they approach the
heteroclinic connection. When considering a non-autonomous ($T$-periodic)
Hamiltonian perturbation of amplitude $\varepsilon$, using an impact map, we
rigorously prove that, for every $n$ and $m$ relatively prime and
$\varepsilon>0$ small enough, there exists a $nT$-periodic orbit impacting $2m$
times with the switching manifold at every period if a modified subharmonic
Melnikov function possesses a simple zero. We also prove that, if the orbits
are discontinuous when they cross $x=0$, then all these orbits exist if the
relative size of $\varepsilon>0$ with respect to the magnitude of this jump is
large enough. We also obtain similar conditions for the splitting of the
heteroclinic connections.
