Electron paramagnetic resonance (EPR) was used to study 4H- and 6H-SiC doped with P during chemical vapour deposition (CVD) growth. In 6H-SiC, three spectra with C3v symmetry and spin S=1/2, labelled Ph, Pc1 and Pc2, were detected. The g-values and the 31P hyperfine (hf) constants were determined for Ph: g||=2.0046, g^=2.0028, and A||=0.103 mT, A^<0.05 mT; for Pc1: g||=2.0039, g^=2.0025, and A||=0.615 mT, A^=0.43 mT; for Pc2: g||=2.0038(5), g^=2.0025, and A||=0.40 mT, A^=0.22 mT. The hf interaction with nearest 13C neighbours were also observed for the Pc1 and Pc2 centers, confirming that in CVD grown material the shallow P donor occupies the Si site. The Ph, Pc1 and Pc2 centers are assigned to the ground states of the shallow P at the hexagonal (Ph) and quasi-cubic sites (Pc1 and Pc2) in 6H-SiC. In 4H-SiC, an EPR spectrum of C3v symmetry with a larger anisotropy in the g-values (g||=2.0065 and g^=2.0006) was observed. The temperature dependence of the spectrum is similar to that of Ph in the 6H polytype. Its 31P hyperfine constants are determined as A||=0.294 mT and A^=0.21 mT.