AM64x MCU+ SDK  09.02.00
VTM

The Voltage and Thermal Management (VTM) controls the temperature monitors in the die. The VTM provides interrupt and event generation for overtemperature through the Error Signaling Module (ESM). It supports 3 different alerts:

  • an early alert so that firmware/software can start doing high-temperature thermal management,
  • a follow-up interrupt for reporting to firmware/software that the temperature has dropped to a safe level,
  • and a late interrupt whose high level can be used to trigger a hardware-voltage domain reset

SDL supports configuration of the VTM voltage domain and temperature warning. The 3 different alerts are also supported via the SDL ESM Handler, like all other ESM events. The SDL API can also be used to configure the VTM Maximum temperature threshold.

The VTM module provides the following functionality for the application

  • Ability to initialize VTM
  • Ability to check the status of the temperature sensor based on alert temperature
  • Ability to clear and contorl the VTM event inerrupts

SysConfig Features

  • None

Features NOT Supported

  • None

Important Usage Guidelines

  • None

Example Usage

The following shows an example of SDL VTM API usage by the application to set up the VTM for monitoring for events. Events can be monitored by enabling the events in the associated ESM instance.

Configure the VTM Thresholds and enable events

/* Initialize the config structure */
memset(&cfgTs, 0x0, sizeof(SDL_VTM_configTs));
/* Set the control bit for the Temperature sensor config to "SET_THR", indicating we want to set the thresholds */
/* Set the Temperature sensor config */
SDL_VTM_GT_TH2_VALID | \
SDL_VTM_LT_TH0_VALID;
cfgTs.thr_val.gtTh2En = TRUE;
cfgTs.thr_val.gtTh2 = gt_thr2_adc_code;
cfgTs.thr_val.gtTh1En = TRUE;
cfgTs.thr_val.gtTh1 = gt_thr1_adc_code;
cfgTs.thr_val.ltTh0En = TRUE;
cfgTs.thr_val.ltTh0 = lt_thr0_adc_code;
/* Select all 3 interrupts to enable using "INTR_EN_SET" control bits */
SDL_VTM_VD_GT_THR1_INTR_EN_SET | \
SDL_VTM_VD_LT_THR0_INTR_EN_CLR;
/* enable the threshold interrupts */
/* Initialize the config structure */
memset(&cfgVd, 0x0, sizeof(SDL_VTM_configVd));
/* enable the tracking of temperature events on this VD */

Convert from Temperature to ADC Code

int32_t temp_val = 64000; // temperature in milli degrees Celsius

Convert from ADC Code to Temperature

SDL_VTM_adc_code adc_code = 404;
int32_t temp_val; // temperature in milli degrees Celsius
SDL_VTM_tsConvAdcToTemp(adc_code, SDL_VTM_INSTANCE_TS_0, &temp_val);

Get Current Temperature Value

SDL_VTM_iStat_read_ctrl readCtrl;
/* Get current temperature value */
SDL_VTM_getSensorStatus(iSDL_VTM_INSTANCE_TS_0, &readCtrl, &statusVal);
adc_code = statusVal.data_out; // data_out has the current temperature


Acknowledge and Disable an interrupt

/* Ack and disable the interrupt, by clearing the pending and enable bits */
SDL_VTM_VD_GT_THR2_INTR_RAW_CLR);


API

APIs for VTM

SDL_VTM_tsThrVal::ltTh0En
bool ltTh0En
Definition: sdl_ip_vtm.h:506
SDL_VTM_tsThrVal::gtTh1
SDL_VTM_adc_code gtTh1
Definition: sdl_ip_vtm.h:496
SDL_VTM_configTs::thr_val
SDL_VTM_tsThrVal thr_val
Definition: sdl_vtm.h:99
SDL_VTM_tsConvTempToAdc
int32_t SDL_VTM_tsConvTempToAdc(int32_t milli_degree_temp_val, SDL_VTM_InstTs instance, SDL_VTM_adc_code *p_adc_code)
VTM Temperature to ADC code conversion.
SDL_VTM_tsThrVal::ltTh0
SDL_VTM_adc_code ltTh0
Definition: sdl_ip_vtm.h:504
SDL_VTM_tsThrVal::gtTh1En
bool gtTh1En
Definition: sdl_ip_vtm.h:498
SDL_VTM_configTs
VTM temperature sensor configuration.
Definition: sdl_vtm.h:89
SDL_VTM_VD_GT_THR2_INTR_EN_CLR
#define SDL_VTM_VD_GT_THR2_INTR_EN_CLR
Definition: sdl_ip_vtm.h:145
SDL_VTM_tsThrVal::gtTh2
SDL_VTM_adc_code gtTh2
Definition: sdl_ip_vtm.h:500
SDL_VTM_configVd::vd_temp_evts
SDL_VTM_vdEvtSel_set vd_temp_evts
Definition: sdl_vtm.h:79
SDL_VTM_VD_CONFIG_CTRL_SET_THR
#define SDL_VTM_VD_CONFIG_CTRL_SET_THR
Definition: sdl_ip_vtm.h:85
SDL_VTM_intrCtrl
uint16_t SDL_VTM_intrCtrl
This enumerator define for VTM Voltage domain threshold interrupt control.
Definition: sdl_ip_vtm.h:133
SDL_VTM_configTs::configTsCtrl
SDL_VTM_configTsCtrl configTsCtrl
Definition: sdl_vtm.h:91
SDL_VTM_VD_CONFIG_CTRL_EVT_SEL
#define SDL_VTM_VD_CONFIG_CTRL_EVT_SEL
Definition: sdl_ip_vtm.h:72
SDL_VTM_TS_READ_DATA_OUT_VAL
#define SDL_VTM_TS_READ_DATA_OUT_VAL
Definition: sdl_ip_vtm.h:385
SDL_VTM_VD_GT_THR2_INTR_EN_SET
#define SDL_VTM_VD_GT_THR2_INTR_EN_SET
Definition: sdl_ip_vtm.h:142
SDL_VTM_VD_EVT_SELECT_TEMP_SENSOR_0
#define SDL_VTM_VD_EVT_SELECT_TEMP_SENSOR_0
Definition: sdl_ip_vtm.h:158
SDL_VTM_initVd
int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain initialization.
SDL_VTM_intrCntrl
int32_t SDL_VTM_intrCntrl(SDL_VTM_InstVd instance, SDL_VTM_intrCtrl intrCtrl)
Set maximum Threshold values of VTM Temperature sensor.
SDL_VTM_INSTANCE_TS_0
@ SDL_VTM_INSTANCE_TS_0
Definition: sdl_soc_vtm.h:56
SDL_VTM_tsThrVal::thrValidMap
SDL_VTM_thr_valid_map thrValidMap
Definition: sdl_ip_vtm.h:494
SDL_VTM_tsThrVal::gtTh2En
bool gtTh2En
Definition: sdl_ip_vtm.h:502
SDL_VTM_getSensorStatus
int32_t SDL_VTM_getSensorStatus(SDL_VTM_InstTs instance, const SDL_VTM_Stat_read_ctrl *pCtrl, SDL_VTM_Stat_val *pStat_val)
Read VTM Temperature sensor status.
SDL_VTM_adc_code
int16_t SDL_VTM_adc_code
This enumerator define for VTM temperature sensor ADC code This is the data_out value of the temperat...
Definition: sdl_ip_vtm.h:396
SDL_VTM_GT_TH1_VALID
#define SDL_VTM_GT_TH1_VALID
Definition: sdl_ip_vtm.h:368
SDL_VTM_initTs
int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor initialization.
SDL_VTM_INSTANCE_VD_DOMAIN_1
@ SDL_VTM_INSTANCE_VD_DOMAIN_1
Definition: sdl_soc_vtm.h:90
SDL_VTM_configVd
VTM Voltage Domain configuration.
Definition: sdl_vtm.h:71
SDL_VTM_configVd::configVdCtrl
SDL_VTM_configVdCtrl configVdCtrl
Definition: sdl_vtm.h:73