Then, by heat-treating the main surface of the substrate SUB, the impurity is diffused in the substrate SUB, thereby forming a p well PW in the main surface of the substrate SUB. Next, by removing a natural oxide film on the surface of the substrate SUB (p well PW) using wet etching solution such as hydrofluoric acid, the surface (silicon surface) of the substrate SUB is exposed.