The stochastic resonance (SR) in a semiconductor layer driven by a dichotomous noise and square-wave signal is investigated. On the assumption that the system satisfies the adiabatic approximation condition, applying the two-state theory, the expression for the output signal-to -noise ratio (SNR) of the system is obtained. The non-monotonic influence of the surrounding temperature on the SNR is found. It is shown that the SNR is a non-monotonic function of the standard deviation of the impurities’ position and the system bias: By choosing the deviation and bias of the impurity, the system SNR can be tuned. For low temperature, large bias can improve the system SNR. Moreover, the SNR increases with the amplitude of the square-wave signal and the ratio between temperature of the hot and cold reservoirs for relatively high temperature, while the SNR decrease with the increase of potential energy and the strength of the dichotomous noise. The results obtained in this paper have certain theoretical significance for the semiconductor design and the investigation of the semiconductor layer process.