
4/29/2020
Godson 3A2000 / 3B2000 Processor User Manual
38
42
Page 47
Godson 3A2000 / 3B2000 Processor User Manual Part 1
8 Temperature sensor
8.1 Real-time temperature sampling
Loongson 3A2000 integrates two temperature sensors internally, which can be performed through the sampling register starting at 0x1FE00198
Observation, at the same time, can use the flexible high and low temperature interrupt alarm or automatic frequency modulation function to control. Temperature sensor in
The corresponding bits of the sampling register are as follows (base address is 0x1FE00198):
Table 8-1 Temperature sampling register description
Bit field
Field name
access
Reset value
description
24 Thsens0_overflow
R
Temperature sensor 0 overflow (over 125
℃
)
25 Thsens1_overflow
R
Temperature sensor 1 overflow (over 125
℃
)
39:32 Thsens0_out
R
Temperature sensor 0 Celsius
Junction temperature = Thens0_out -100
Temperature range -40 degrees – 125 degrees
47:40 Thsens1_out
R
Temperature sensor 1 Celsius
Junction temperature = Thens1_out -100
Temperature range -40 degrees – 125 degrees
other
R
Keep
Through the setting of the control register, it is possible to achieve interruptions above the preset temperature, interruptions below the preset temperature and high temperature
Automatic frequency reduction function.
8.2 High and low temperature interrupt trigger
For the high and low temperature interrupt alarm function, there are 4 groups of control registers to set their thresholds. Each set of register packets
Contains the following three control bits:
GATE: Set the threshold for high or low temperature. When the input temperature is higher than the high temperature threshold or lower than the low temperature threshold, i
Interruption
EN: interrupt enable control. The setting of this group of registers is valid after being set to 1;
SEL: Input temperature selection. Currently 3A2000 integrates two temperature sensors, this register is used for configuration selection
The temperature of which sensor is used as input. You can use 0 or 1.
The high temperature interrupt control register contains 4 sets of setting bits for controlling high temperature interrupt trigger;
The device contains 4 sets of setting bits for controlling low temperature interrupt trigger. There is also a set of registers used to display the interrupt status, divided
Do not correspond to high temperature interrupt and low temperature interrupt, any write operation to this register will clear the interrupt status.
43
Page 48
Godson 3A2000 / 3B2000 Processor User Manual Part 1