The invention discloses an on-
chip temperature sensor based on an 
RC oscillator, and a temperature detection method of the on-
chip temperature sensor. The temperature sensor comprises the 
RC oscillator, a counter, a CPU, and a storage unit, wherein the 
RC oscillator is used for generating a 
clock signal, and the output frequency of the 
clock signal changes with temperature. The counter is used for counting the number of pulses of the 
clock signal in a certain gate time period, and calculates the frequency of the 
clock signal outputted by the RC oscillator. The storage unit is used for storing a frequency-temperature look-up table in advance. The CPU is used for obtaining the temperature value corresponding to a current 
clock signal frequency according to the obtained 
clock signal frequency through a table look-up method. Compared with the prior art, the temperature sensor enables the temperature change to be reflected by the change of the frequency of the clock signal outputted by the oscillator through the 
working temperature characteristics of the RC oscillator, and the CPU can obtain the current temperature of the core of a 
chip through reading the 
frequency count value. Therefore, there is no need to set an additional chip in the temperature sensor, thereby greatly reducing the chip area occupied by the temperature sensor. Meanwhile, the temperature sensor can meet the various types of 
clock control application demands.