It is essential to estimate stator inductance and rotor flux linkage online for fault diagnosis and high-performance control of surface-mounted permanent magnet synchronous machine (SPMSM). Current injection method is a popular way to estimate the two parameters. However, the dead-time influence of voltage-source-inverter (VSI) and the stator inductance variation caused by injected current could not guarantee the converge of the estimation. To solve the above two problems, a method of injecting square-wave angle for online parameter estimation is proposed in this paper. Firstly, the theory of eliminating dead-time influence with and without square-wave angle injection is analysed. Next, the least square algorithm is adopted to estimate stator inductance without injection. Then the rotor flux linkage is estimated with injecting square-wave angle. The saturation effect on estimation is also analyzed and both parameters are estimated without acquiring any nominal values. At last, the appropriate amplitude and frequency of square-wave angle are determined by the parameter error and convergence analysis. The proposed method is evaluated with simulation and extensive experiments under various speed and load conditions. It is noteworthy that not less than two parameters are estimated without the dead-time influence and the injection will not cause inductance variation, which is different from the previous work.