27. Digital temperature sensor (DTS)

27.1 DTS introduction

The device embeds a sensor that converts the temperature into a square wave which frequency is proportional to the temperature. The frequency is measured either with the PCLK or the LSE clock.

27.2 DTS main features

The temperature sensor block main features are the following:

27.3 DTS functional description

27.3.1 DTS block diagram

The temperature sensor block diagram is shown in Figure 265 .

Figure 265. Temperature sensor functional block diagram

Functional block diagram of the Digital Temperature Sensor (DTS). The diagram shows a 'PTAT to FRQ converter' block connected to an 'APB bus' and receiving 'dts_lse' and 'dts_pclk' inputs. It outputs 'CLK_PTAT' and 'Calibration control' signals to a 'Frequency Counter Calibration Control' block. This block also receives 'LSE' and 'PCLK' signals and has various configuration registers: 'START', 'SMP_TIME', 'REFCLK_SEL', 'Q_MEAS_opt', 'HSREF_CLK_DIV', 'ts1_trg0', 'ts1_trg1', 'ts1_trg2', '...', 'ts1_trgx', and 'INTRIG[3:0]'. It outputs 'TS1_MFREQ[15:0]' to an 'APB interface' block and 'HITTHD[15:0]' and 'LITTHD[15:0]' to a 'Comparator' block. The 'Comparator' block also receives 'CLK_PTAT' and 'Calibration control' signals and outputs 'dts_it' and 'dts_wkup' signals. The 'APB interface' block has registers: 'RDY', 'ITEF', 'ITLF', 'ITHF', 'AITEF', 'AITLF', 'AITHF', 'T0', 'FMT0', and 'RAMP_COEFF', and it is connected to the 'APB bus'.
Functional block diagram of the Digital Temperature Sensor (DTS). The diagram shows a 'PTAT to FRQ converter' block connected to an 'APB bus' and receiving 'dts_lse' and 'dts_pclk' inputs. It outputs 'CLK_PTAT' and 'Calibration control' signals to a 'Frequency Counter Calibration Control' block. This block also receives 'LSE' and 'PCLK' signals and has various configuration registers: 'START', 'SMP_TIME', 'REFCLK_SEL', 'Q_MEAS_opt', 'HSREF_CLK_DIV', 'ts1_trg0', 'ts1_trg1', 'ts1_trg2', '...', 'ts1_trgx', and 'INTRIG[3:0]'. It outputs 'TS1_MFREQ[15:0]' to an 'APB interface' block and 'HITTHD[15:0]' and 'LITTHD[15:0]' to a 'Comparator' block. The 'Comparator' block also receives 'CLK_PTAT' and 'Calibration control' signals and outputs 'dts_it' and 'dts_wkup' signals. The 'APB interface' block has registers: 'RDY', 'ITEF', 'ITLF', 'ITHF', 'AITEF', 'AITLF', 'AITHF', 'T0', 'FMT0', and 'RAMP_COEFF', and it is connected to the 'APB bus'.

MSV69530V2

27.3.2 DTS internal signals

Table 272. DTS internal input/output signals

Signal nameSignal typeDescription
dts_lseDigital inputLSE clock
dts_pclkDigital inputAPB clock
dts_itDigital outputTemperature sensor interrupt
dts_wkupDigital outputTemperature sensor wakeup

27.3.3 DTS block operation

The analog part of the temperature sensor outputs a frequency that is proportional to the absolute temperature (CLK_PTAT). The frequency measurement is based on the PCLK or the LSE clock.

Before each measurement, the temperature sensor performs a calibration of the frequency generation blocks.

27.3.4 Operating modes

Several operating modes can be selected by setting the REFCLK_SEL bit in Temperature sensor configuration register 1 (DTS_CFGR1) :

The temperature sensor registers can be accessed. The interface can consequently be reconfigured and the measurement sequence is performed using PCLK clock

The temperature sensor registers can be accessed. The interface can consequently be reconfigured and the measurement sequence is performed using the LSE clock.

The registers cannot be accessed. The measurement can be performed using the LSE clock. This mode is used to exit from Sleep mode by using hardware triggers and the asynchronous interrupt line.

27.3.5 Calibration

The temperature sensor must run the calibration prior to any frequency measurement. The calibration is performed automatically when the temperature measurement is triggered except for quick measurement mode (Q_MEAS_OPT set to 1 in DTS_CFGR1).

27.3.6 Prescaler

When a calibration is ongoing, the counter clock must be slower than 1 MHz. This is achieved by the PCLK clock prescaler embedded in the temperature sensor.

During the temperature measurement period, the prescaler is bypassed.

27.3.7 Temperature measurement principles

The analog part of temperature sensor outputs a signal (CLK_PTAT) which FM(T) frequency is temperature-dependent.

Either PCLK or LSE can be selected as reference clock (REF_CLK) through the REFCLK_SEL bit in DTS_CFGR1.

The counting method depends on the REF_CLK frequency. This is due to the fact that two counters are implemented in the temperature sensor block:

This counter behavior is shown in Figure 266 and Figure 267 .

Figure 266. Method for low REF_CLK frequencies

Timing diagram showing the method for low REF_CLK frequencies. The top signal is FM(T), a high-frequency square wave. The bottom signal is REF_CLK (LSE), a low-frequency square wave. Vertical dashed lines mark the start and end of a measurement interval corresponding to one period of the REF_CLK (LSE) signal. During this interval, multiple cycles of the FM(T) signal are counted. The diagram is labeled MSv40361V1 in the bottom right corner.
Timing diagram showing the method for low REF_CLK frequencies. The top signal is FM(T), a high-frequency square wave. The bottom signal is REF_CLK (LSE), a low-frequency square wave. Vertical dashed lines mark the start and end of a measurement interval corresponding to one period of the REF_CLK (LSE) signal. During this interval, multiple cycles of the FM(T) signal are counted. The diagram is labeled MSv40361V1 in the bottom right corner.
  1. 1. To increase the precision, FM(T) measurement can be done on several LSE periods.

Figure 267. Method for high REF_CLK frequencies

Timing diagram showing the method for high REF_CLK frequencies. The top signal is FM(T), a low-frequency square wave. The bottom signal is REF_CLK (PCLK), a high-frequency square wave. Vertical dashed lines mark the start and end of a measurement interval corresponding to one period of the FM(T) signal. During this interval, multiple cycles of the REF_CLK (PCLK) signal are counted. The diagram is labeled MSv40850V1 in the bottom right corner.
Timing diagram showing the method for high REF_CLK frequencies. The top signal is FM(T), a low-frequency square wave. The bottom signal is REF_CLK (PCLK), a high-frequency square wave. Vertical dashed lines mark the start and end of a measurement interval corresponding to one period of the FM(T) signal. During this interval, multiple cycles of the REF_CLK (PCLK) signal are counted. The diagram is labeled MSv40850V1 in the bottom right corner.
  1. 1. To increase the precision, PCLK measurement can be done on several FM(T) periods.

The counting result is stored in the DTS_DR register (see Temperature sensor data register (DTS_DR) ).

Once the FM(T) frequency has been obtained, the corresponding temperature can be calculated by software using the following formula:

\[ T = T_0 + ((F_{PCLK} / TS1\_MFREQ) \times TS1\_SMP\_TIME - 100 \times TS1\_FMT0) / TS1\_RAMP\_COEFF \]

where

T 0 (factory calibration temperature) is equal to 30 °C.

TS1_FMT0 is measured and stored in the DTS_T0VALR1 register. It is expressed in hundreds of Hertz.

TS1_RAMP_COEFF is measured during tests in factory and stored in DTS_RAMPVALR register. This value is expressed in Hz/°C.

\[ T = T_0 + ((F_{LSE} \times TS1\_MFREQ / TS1\_SMP\_TIME) - (100 \times TS1\_FMT0)) / TS1\_RAMP\_COEFF \]

27.3.8 Sampling time

The sampling period can be increased to improve measurement accuracy. This is useful when the reference frequency (REF_CLK) is close to the FM(T) frequency. The default value is one REF_CLK cycle in LSE mode, and one FM(T) cycle in PCLK mode.

The sampling time is configured through TS1_SMP_TIME bits in DTS_CFGR1 register (see Table 273 ).

Table 273. Sampling time configuration

TS1_SMP_TIME[3:0]LSE or FM(T) clock cycle(s)
00001
00011
00102
00113
01004
01015
01106
01117
10008
10019
101010
101111
110012
110113
111014
111115

27.3.9 Quick measurement mode

If a high precision is not required, the calibration step included in each measurement sequence can be skipped by setting Q_MEAS_OPT to 1 in the DTS_CFGR1 register. This method must be used only when the LSE clock is selected as reference clock (LSREF_CLK set to 1). This mode can reduce the measurement time.

27.3.10 Trigger input

The temperature measurement can be triggered either by software or by an external event. The trigger source can be selected through TS1_INTRIG[3:0] bits in DTS_CFGR1.

Table 274. Trigger configuration

NameTS1_INTRIG[3:0]Comment
0123
N.A0000No hardware trigger
ts1_trg00001lptim1_ch1
ts1_trg10010lptim2_ch1
ts1_trg20011lptim3_ch1
ts1_trg30100exti13
ts1_trg40101Reserved
ts1_trg50110
ts1_trg60111
ts1_trg71000
ts1_trg81001
ts1_trg91010
ts1_trg101011
ts1_trg111100
ts1_trg121101
ts1_trg131110
ts1_trg141111

Note: Hardware triggers are active only on the rising edge.

The temperature sensor can only capture a hardware trigger rising edge when TS1_RDY bit is set (see Section 27.3.11: On-off control and ready flag ), otherwise the trigger is ignored.

If a trigger source changes on-the-fly, the new trigger source signal should be low. If the new source signal is high, the temperature sensor detects a rising edge and start the measurement sequence.

27.3.11 On-off control and ready flag

The DTS block can be enabled by setting TS1_EN bit in DTS_CFGR1 register. The TS1_RDY flag in the Temperature sensor status register (DTS_SR) indicate that the DTS block is ready for temperature measurement: when TS1_RDY bit is set to 1, the measurement can be started. Once a measurement has started, TS1_RDY bit is reset. New measurement requests are then ignored. Once the measurement is finished, TS1_RDY bit is set again to indicate the sensor is ready to start a new measurement.

27.3.12 Temperature measurement sequence

Start of measurement can be triggered by software or hardware.

Software trigger

The software trigger is selected when TS1_INTRIG_SEL[3:0] is set to '0000' in DTS_CFGR1.

If TS1_RDY is set to 1, writing TS1_START bit to 1 in DTS_CFGR1 starts the measurement.

If TS1_RDY equals 0, the software trigger does not start until TS1_RDY is set.

If TS1_START bit is kept at 1 once the measurement is finished, then the TS1_RDY flag become 1 and the measurement restarts.

Hardware trigger

TS1_INTRIG_SEL[3:0] bits allow selecting one hardware trigger out of 4. If TS1_RDY is set to 1, a rising edge on the trigger signal starts the measurement. When TS1_RDY is 0, the rising edge is ignored.

Temperature measurement sequence

One measurement contains two steps: the calibration of the analog blocks and the measurement. The calibration automatically starts when the measurement is triggered (see Section 27.3.5: Calibration ). The measurement period depends on the following DTS_CFGR1 bits:

Figure 268. Temperature sensor sequence

A flow diagram showing the temperature sensor sequence. It starts with a 'Start' block, followed by a 'Measure' block. The 'Measure' block is further divided into 'Calibration' and 'Frequency measure' sub-steps. The sequence ends with a 'Result' block. The diagram is labeled MSV40363V1.

The diagram illustrates the sequence of operations for the temperature sensor. It begins with a 'Start' block, which leads to a 'Measure' block. The 'Measure' block is subdivided into 'Calibration' and 'Frequency measure' sub-steps. The sequence concludes with a 'Result' block. The diagram is labeled MSV40363V1.

A flow diagram showing the temperature sensor sequence. It starts with a 'Start' block, followed by a 'Measure' block. The 'Measure' block is further divided into 'Calibration' and 'Frequency measure' sub-steps. The sequence ends with a 'Result' block. The diagram is labeled MSV40363V1.

27.4 DTS low-power modes

Table 275. Temperature sensor behavior in low-power modes

ModeDescription
SleepOnly works in LSE mode.
DTS interrupt causes the device to exit from Sleep mode.
StopOnly works in LSE mode.
DTS interrupt cause the device to exit from Stop mode.

27.5 DTS interrupts

There are two ways to use the DTS block as an interrupt source. The DTS interrupt line can be connected to the EXTI controller (see Section 27.5.3: Asynchronous wakeup ) or to the CPU NVIC (see Section 27.5.2: Synchronous interrupt ).

27.5.1 Temperature window comparator

The DTS_ITR1 register allows defining the high and low threshold that are used for temperature comparison. If the temperature data is equal or higher than TS1_HITTHD, or equal or lower than TS1_LITTHD bit, an interrupt is generated and the corresponding flag, TS1_ITLF, TS1_ITHF, TS1_AITLF and TS1_AITHF, is set in the DTS_SR register (see Section 27.6.6 ).

27.5.2 Synchronous interrupt

A global interrupt output line is available on the DTS block. The interrupt can be generated at the end of measurement and/or when the measurement result is equal/higher or equal/lower than a predefined threshold (see Section 27.5.1: Temperature window comparator ).

Three interrupt events can be select via 3 bits in DTS_ITENR register (see Section 27.6.7 ). All combinations of interrupts are allowed.

The TS1_ITEF, TS1_ITLF and TS1_ITHF flags in the DTS_SR register reflect the interrupt event. They can be reset with the correspond bits of the DTS_ICIFR register (see Section 27.6.8 ).

27.5.3 Asynchronous wakeup

The DTS block also provides an asynchronous interrupt line. It is used only when the LSE is selected as reference clock (REFCLK_SEL=1).

This line can generate a signal that wakes up the system from Sleep mode at the end of measurement and/or when the measurement result is equal/higher or equal/lower than a predefined threshold (see Section 27.5.1: Temperature window comparator ).

Three asynchronous wakeup events can be selected via 3 bits in DTS_ITENR register. All combination of interrupts are allowed.

The TS1_AITEF, TS1_AITLF and TS1_AITHF flags in the DTS_SR register reflect the interrupt status. They can be reset with the correspond bits of the DTS_ICIFR register.

The following table shows the interrupt bits an the their description.

Table 276. Interrupt control bits

Interrupt eventInterrupt flagEnable control bitInterrupt clear bitExit from Sleep modeSynchronous/ Asynchronous
At the end of measurementTS1_ITEF in DTS_SRTS1_ITEEN in DTS_ITENRTS1_CITEF in DTS_ICIFRNOSynchronous on PCLK
When the measure is equal or exceeds the low thresholdTS1_ITLF in DTS_SRTS1_ITLEN in DTS_ITENRTS1_CITLF in DTS_ICIFRNO
When the measure is equal or exceeds the high thresholdTS1_ITHF in DTS_SRTS1_ITHEN in DTS_ITENRTS1_CITHF in DTS_ICIFRNO
At the end of measurementTS1_AITEF in DTS_SRTS1_AITEEN in DTS_ITENRTS1_CAITEF in DTS_ICIFRYESAsynchronous
When the measure is equal or exceeds the low thresholdTS1_AITLF in DTS_SRTS1_AITLEN in DTS_ITENRTS1_CAITLF in DTS_ICIFRYES
When the measure is equal or exceeds the high thresholdTS1_AITHF in DTS_SRTS1_AITHEN in DTS_ITENRTS1_CAITHF in DTS_ICIFRYES

27.6 DTS registers

The registers of this peripheral can only be accessed by-word (32-bit).

27.6.1 Temperature sensor configuration register 1 (DTS_CFGR1)

DTS_CFGR1 is the configuration register for temperature sensor 1.

Address offset: 0x00

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.HSREF_CLK_DIV[6:0]Res.Res.Q_MEAS_OPTREFCLK_SELTS1_SMP_TIME[3:0]
rwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
Res.Res.Res.Res.TS1_INTRIG_SEL[3:0]Res.Res.Res.TS1_STARTRes.Res.Res.TS1_EN
rwrwrwrwrwrw

Bit 31 Reserved, must be kept at reset value.

Bits 30:24 HSREF_CLK_DIV[6:0] : High speed clock division ratio

These bits are set and cleared by software. They can be used to define the division ratio for the main clock in order to obtain the internal frequency lower than 1 MHz required for the calibration. They are applicable only for calibration when PCLK is selected as reference clock (REFCLK_SEL=0).

0000000: No divider

0000001: No divider

0000010: 1/2 division ratio

...

1111111: 1/127 division ratio

Bits 23:22 Reserved, must be kept at reset value.

Bit 21 Q_MEAS_OPT : Quick measurement option bit

This bit is set and cleared by software. It is used to increase the measurement speed by suppressing the calibration step. It is effective only when the LSE clock is used as reference clock (REFCLK_SEL=1).

0: Measurement with calibration

1: Measurement without calibration

Bit 20 REFCLK_SEL : Reference clock selection bit

This bit is set and cleared by software. It indicates whether the reference clock is the high speed clock (PCLK) or the low speed clock (LSE).

0: High speed reference clock (PCLK)

1: Low speed reference clock (LSE)

Bits 19:16 TS1_SMP_TIME[3:0] : Sampling time for temperature sensor 1

These bits allow increasing the sampling time to improve measurement precision.

When the PCLK clock is selected as reference clock (REFCLK_SEL = 0), the measurement is performed at TS1_SMP_TIME period of CLK_PTAT.

When the LSE is selected as reference clock (REFCLK_SEL = 1), the measurement is performed at TS1_SMP_TIME period of LSE.

Bits 15:12 Reserved, must be kept at reset value.

Bits 11:8 TS1_INTRIG_SEL[3:0] : Input trigger selection bit for temperature sensor 1

These bits are set and cleared by software. They select which input triggers a temperature measurement. Refer to Section 27.3.10: Trigger input .

Bits 7:5 Reserved, must be kept at reset value.

Bit 4 TS1_START : Start frequency measurement on temperature sensor 1

This bit is set and cleared by software.

0: No software trigger.

1: Software trigger for a frequency measurement. (only if TS1 is ready).

Bits 3:1 Reserved, must be kept at reset value.

Bit 0 TS1_EN : Temperature sensor 1 enable bit

This bit is set and cleared by software.

0: Temperature sensor 1 disabled

1: Temperature sensor 1 enabled

Note: Once enabled, the temperature sensor is active after a specific delay time. The TS1_RDY flag is set when the sensor is ready.

27.6.2 Temperature sensor T0 value register 1 (DTS_T0VALR1)

DTS_T0VALR1 contains the value of the factory calibration temperature (T0) for temperature sensor 1. The reset value is factory trimmed.

Address offset: 0x08

Reset value: 0x000X XXXX

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_T0[1:0]
rr
1514131211109876543210
TS1_FMT0[15:0]
rrrrrrrrrrrrrrrr

Bits 31:18 Reserved, must be kept at reset value.

Bits 17:16 TS1_T0[1:0] : Engineering value of the T0 temperature for temperature sensor 1.

00: 30 °C

01: 130 °C

Others: Reserved, must not be used.

Bits 15:0 TS1_FMT0[15:0] : Engineering value of the frequency measured at T0 for temperature sensor 1

This value is expressed in 0.1 kHz.

27.6.3 Temperature sensor ramp value register (DTS_RAMPVALR)

The DTS_RAMPVALR is the ramp coefficient for the temperature sensor. The reset value is factory trimmed.

Address offset: 0x10

Reset value: 0xXXXX XXXX

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
TS1_RAMP_COEFF[15:0]
rrrrrrrrrrrrrrrr

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 TS1_RAMP_COEFF[15:0] : Engineering value of the ramp coefficient for the temperature sensor 1.

This value is expressed in Hz/°C.

27.6.4 Temperature sensor interrupt threshold register 1 (DTS_ITR1)

DTS_ITR1 contains the threshold values for sensor 1.

Address offset: 0x14

Reset value: 0x0000 0000

31302928272625242322212019181716
TS1_HITTHD[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TS1_LITTHD[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 TS1_HITTHD[15:0] : High interrupt threshold for temperature sensor 1

These bits are set and cleared by software. They indicate the highest value than can be reached before raising an interrupt signal.

Bits 15:0 TS1_LITTHD[15:0] : Low interrupt threshold for temperature sensor 1

These bits are set and cleared by software. They indicate the lowest value than can be reached before raising an interrupt signal.

27.6.5 Temperature sensor data register (DTS_DR)

The DTS_DR contains the number of REF_CLK cycles used to compute the FM(T) frequency.

Address offset: 0x1C

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
TS1_MFREQ[15:0]
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:16 Reserved, must be kept at reset value.

Bits 15:0 TS1_MFREQ[15:0] : Value of the counter output value for temperature sensor 1

27.6.6 Temperature sensor status register (DTS_SR)

Address offset: 0x20

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
TS1_RDYRes.Res.Res.Res.Res.Res.Res.Res.TS1_AITHFTS1_AITLFTS1_AITEFRes.TS1_ITHFTS1_ITLFTS1_ITEF
rrrrrrr

Bits 31:16 Reserved, must be kept at reset value.

Bit 15 TS1_RDY : Temperature sensor 1 ready flag

This bit is set and reset by hardware.

It indicates that a measurement is ongoing.

0: Temperature sensor 1 busy

1: Temperature sensor 1 ready

Bits 14:7 Reserved, must be kept at reset value.

Bit 6 TS1_AITHF : Asynchronous interrupt flag for high threshold on temperature sensor 1

This bit is set by hardware when the high threshold is reached.

It is cleared by software by writing 1 to the TS1_CAITHF bit in the DTS_ICIFR register.

0: High threshold not reached on temperature sensor 1

1: High threshold reached on temperature sensor 1

Note: This bit is active only when the TS1_AITHFEN bit is set

Bit 5 TS1_AITLF : Asynchronous interrupt flag for low threshold on temperature sensor 1

This bit is set by hardware when the low threshold is reached.

It is cleared by software by writing 1 to the TS1_CAITLF bit in the DTS_ICIFR register.

0: Low threshold not reached on temperature sensor 1

1: Low threshold reached on temperature sensor 1

Note: This bit is active only when the TS1_AITLFEN bit is set

Bit 4 TS1_AITEF : Asynchronous interrupt flag for end of measure on temperature sensor 1

This bit is set by hardware when a temperature measure is done.

It is cleared by software by writing 1 to the TS1_CAITEF bit in the DTS_ICIFR register.

0: End of measure not detected on temperature sensor 1

1: End of measure detected on temperature sensor 1

Note: This bit is active only when the TS1_AITEFEN bit is set

Bit 3 Reserved, must be kept at reset value.

Bit 2 TS1_ITHF : Interrupt flag for high threshold on temperature sensor 1, synchronized on PCLK

This bit is set by hardware when the high threshold is set and reached.

It is cleared by software by writing 1 to the TS1_CITHF bit in the DTS_ICIFR register.

0: High threshold not reached on temperature sensor 1

1: High threshold reached on temperature sensor 1

Note: This bit is active only when the TS1_ITHFEN bit is set

Bit 1 TS1_ITLF : Interrupt flag for low threshold on temperature sensor 1, synchronized on PCLK.

This bit is set by hardware when the low threshold is set and reached.

It is cleared by software by writing 1 to the TS1_CITLF bit in the DTS_ICIFR register.

0: Low threshold not reached on temperature sensor 1

1: Low threshold reached on temperature sensor 1

Note: This bit is active only when the TS1_ITLFEN bit is set

Bit 0 TS1_ITEF : Interrupt flag for end of measurement on temperature sensor 1, synchronized on PCLK.

This bit is set by hardware when a temperature measure is done.

It is cleared by software by writing 1 to the TS2_CITEF bit in the DTS_ICIFR register.

0: No end of measurement detected on temperature sensor 1

1: End of measure detected on temperature sensor 1

Note: This bit is active only when the TS1_ITEFEN bit is set

27.6.7 Temperature sensor interrupt enable register (DTS_ITENR)

Address offset: 0x24

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_AITHENTS1_AITLENTS1_AITEENRes.TS1_ITHENTS1_ITLENTS1_ITEEN
rwrwrwrwrwrw

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 TS1_AITHEN : Asynchronous interrupt enable flag on high threshold for temperature sensor 1.

This bit are set and cleared by software.

It enables the asynchronous interrupt when the temperature is above the high threshold (only when REFCLK_SEL= 1")

0: Asynchronous interrupt on high threshold disabled for temperature sensor 1

1: Asynchronous interrupt on high threshold enabled for temperature sensor 1

Bit 5 TS1_AITLEN : Asynchronous interrupt enable flag for low threshold on temperature sensor 1.

This bit are set and cleared by software.

It enables the asynchronous interrupt when the temperature is below the low threshold (only when REFCLK_SEL= 1)

0: Asynchronous interrupt on low threshold disabled for temperature sensor 1

1: Asynchronous interrupt on low threshold enabled for temperature sensor 1

Bit 4 TS1_AITEEN : Asynchronous interrupt enable flag for end of measurement on temperature sensor 1

This bit are set and cleared by software.

It enables the asynchronous interrupt for end of measurement (only when REFCLK_SEL = 1).

0: Asynchronous interrupt for end of measurement disabled on temperature sensor 1

1: Asynchronous interrupt for end of measurement enabled on temperature sensor 1

Bit 3 Reserved, must be kept at reset value.

Bit 2 TS1_ITHEN : Interrupt enable flag for high threshold on temperature sensor 1, synchronized on PCLK.

This bit are set and cleared by software.

It enables the interrupt when the measure reaches or is above the high threshold.

0: Synchronous interrupt for high threshold disabled on temperature sensor 1

1: Synchronous interrupt for high threshold enabled on temperature sensor 1

Bit 1 TS1_ITLEN : Interrupt enable flag for low threshold on temperature sensor 1, synchronized on PCLK.

This bit are set and cleared by software.

It enables the synchronous interrupt when the measure reaches or is below the low threshold.

0: Synchronous interrupt for low threshold disabled on temperature sensor 1

1: Synchronous interrupt for low threshold enabled on temperature sensor 1

Bit 0 TS1_ITEEN : Interrupt enable flag for end of measurement on temperature sensor 1, synchronized on PCLK.

This bit are set and cleared by software.

It enables the synchronous interrupt for end of measurement.

0: Synchronous interrupt for end of measurement disabled on temperature sensor 1

1: Synchronous interrupt for end of measurement enabled on temperature sensor 1

27.6.8 Temperature sensor clear interrupt flag register (DTS_ICIFR)

DTS_ICIFR is the control register for the interrupt flags.

Address offset: 0x28

Reset value: 0x0000 0000

31302928272625242322212019181716
Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.
1514131211109876543210
Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_
CAITHF
TS1_
CAITLF
TS1_
CAITEF
Res.TS1_
CITHF
TS1_
CITLF
TS1_
CITEF
rc_w1rc_w1rc_w1rc_w1rc_w1rc_w1

Bits 31:7 Reserved, must be kept at reset value.

Bit 6 TS1_CAITHF : Asynchronous interrupt clear flag for high threshold on temperature sensor 1
Writing 1 to this bit clears the TS1_AITHF flag in the DTS_SR register.

Bit 5 TS1_CAITLF : Asynchronous interrupt clear flag for low threshold on temperature sensor 1
Writing 1 to this bit clears the TS1_AITLF flag in the DTS_SR register.

Bit 4 TS1_CAITEF : Write once bit. Clear the asynchronous IT flag for End Of Measure for thermal sensor 1.

Writing 1 clears the TS1_AITEF flag of the DTS_SR register.

Bit 3 Reserved, must be kept at reset value.

Bit 2 TS1_CITHF : Interrupt clear flag for high threshold on temperature sensor 1

Writing this bit to 1 clears the TS1_ITHF flag in the DTS_SR register.

Bit 1 TS1_CITLF : Interrupt clear flag for low threshold on temperature sensor 1

Writing 1 to this bit clears the TS1_ITLF flag in the DTS_SR register.

Bit 0 TS1_CITEF : Interrupt clear flag for end of measurement on temperature sensor 1

Writing 1 to this bit clears the TS1_ITEF flag in the DTS_SR register.

27.6.9 Temperature sensor option register (DTS_OR)

The DTS_OR contains general-purpose option bits.

Address offset: 0x2C

Reset value: 0x0000 0000

31302928272625242322212019181716
TS_OP
31
TS_OP
30
TS_OP
29
TS_OP
28
TS_OP
27
TS_OP
26
TS_OP
25
TS_OP
24
TS_OP
23
TS_OP
22
TS_OP
21
TS_OP
20
TS_OP
19
TS_OP
18
TS_OP
17
TS_OP
16
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw
1514131211109876543210
TS_OP
15
TS_OP
14
TS_OP
13
TS_OP
12
TS_OP
11
TS_OP
10
TS_OP
9
TS_OP
8
TS_OP
7
TS_OP
6
TS_OP
5
TS_OP
4
TS_OP
3
TS_OP
2
TS_OP
1
TS_OP
0
rwrwrwrwrwrwrwrwrwrwrwrwrwrwrwrw

Bits 31:0 TS_OP[31:0] : general purpose option bits

27.6.10 DTS register map

The following table summarizes the temperature sensor registers.

Table 277. DTS register map and reset values

OffsetRegister name
reset value
313029282726252423222120191817161514131211109876543210
0x00DTS_CFGR1Res. HSREF_CLK_DIV [6:0]Res.Res.Q_MEAS_OPTREFCLK_SELTS1_SMP_TIME [3:0]Res.Res.Res.Res.TS1_INTRIG_SEL [3:0]Res.Res.Res.Res.TS1_STARTRes.Res.Res.TS1_EN
Reset value00000000000000000000000000000000
0x04Reserved
0x08DTS_T0VALR1Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_T0[15:0]
Reset valueXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0x0CReserved
0x10DTS_RAMPVALRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_RAMP_COEFF[15:0]
Reset valueXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0x14DTS_ITR1TS1_HITTHD[15:0]
Reset value00000000000000000000000000000000
0x18Reserved
0x1CDTS_DRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_MFREQ[15:0]
Reset value00000000000000000000000000000000
0x20DTS_SRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_RDYRes.Res.Res.Res.Res.Res.Res.Res.Res.TS1_AITHFTS1_AITLFRes.Res.TS1_JTHFTS1_JTLF
Reset value00000000000000000000000000000000
0x24DTS_ITENRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_AITHENTS1_AITLENRes.Res.TS1_JTHENTS1_JTLEN
Reset value00000000000000000000000000000000
0x28DTS_ICIFRRes.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.Res.TS1_CAITHFTS1_CAITLFRes.Res.TS1_CITHFTS1_CITLF
Reset value00000000000000000000000000000000
0x2CDTS_ORTS_OP31TS_OP30TS_OP29TS_OP28TS_OP27TS_OP26TS_OP25TS_OP24TS_OP23TS_OP22TS_OP21TS_OP20TS_OP19TS_OP18TS_OP17TS_OP16TS_OP15TS_OP14TS_OP13TS_OP12TS_OP11TS_OP10TS_OP9TS_OP8TS_OP7TS_OP6TS_OP5TS_OP4TS_OP3TS_OP2TS_OP1TS_OP0
Reset value00000000000000000000000000000000

Refer to Section 2.3: Memory organization for the register boundary addresses.