Rotating waves are periodic solutions in SO(2) equivariant dynamical systems. Their precession frequency changes with parameters and it may change sign, passing through zero. When this happens, the dynamical system is very sensitive to imperfections that break the SO(2) symmetry and the waves may become trapped by the imperfections, resulting in steady solutions that exist in a finite region in parameter space. This is the so-called pinning phenomenon. In this study, we analyse the breaking of the SO(2) symmetry in a dynamical system close to a Hopf bifurcation whose frequency changes sign along a curve in parameter space. The problem is very complex, as it involves the complete unfolding of high codimension. A detailed analysis of different types of imperfections indicates that a pinning region surrounded by infinite-period bifurcation curves appears in all cases. Complex bifurcational processes, strongly dependent on the specifics of the symmetry breaking, appear very close to the intersection of the Hopf bifurcation and the pinning region. Scaling laws of the pinning region width and partial breaking of SO(2) to Z m are also considered. Previous as well as new experimental and numerical studies of pinned rotating waves are reviewed in the light of the new theoretical results.