AM261x MCU+ SDK: VTM Functions

| AM261x MCU+ SDK 26.00.00 |

Functions
VTM Functions
APIs for VTM

## Introduction

## Functions
int32_t | SDL_VTM_initTs (const SDL_VTM_configTs *pConfig)
| VTM Temperature sensor initialization. More...
int32_t | SDL_VTM_getTemp (SDL_VTM_InstTs instance, uint32_t *pTempVal)
| Read VTM Temperature sensor values in degree celcius. More...
int32_t | SDL_VTM_setAlertTemp (SDL_VTM_InstTs instance, int32_t alert_th_hot, int32_t alert_th_cold)
| Set thresholds for temperature alerts. More...
int32_t | SDL_VTM_setTShutTemp (SDL_VTM_InstTs instance, int32_t tshut_th_hot, int32_t tshut_th_cold)
| Set thresholds for temperature Shutdown. More...
int32_t | SDL_VTM_setClearInterrupts (SDL_VTM_InstTs instance, uint8_t hotintr, uint8_t coldintr, uint8_t lowthresholdintr)
| API to set/Clear masks for generating interrupts. More...
int32_t | SDL_VTM_getSensorStatus (SDL_VTM_Stat_val *pStat_val)
| Read VTM Temperature sensor status. More...
void | SDL_VTM_enableTs (uint32_t sensorSelect, uint8_t delay)
| Enable Required Temperature sensors. More...
void | SDL_VTM_enableTc (void)
| Enable Temperature Controller. More...
void | SDL_VTM_disableTc (void)
| Disable Temperature Controller. More...
int32_t | SDL_VTM_getStaticRegistersTs (SDL_VTM_staticRegsTs *pStaticRegs)
| VTM Temperature sensor readback Static configuration registers. More...
int32_t | SDL_VTM_enableESMWarmReset (SDL_VTM_InstTs instance)
| Enable Warm Reset Generation. More...

## Function Documentation

## ◆ SDL_VTM_initTs()

int32_t SDL_VTM_initTs | ( | const SDL_VTM_configTs * | pConfig | ) |

VTM Temperature sensor initialization.

This function executes a VTM Temperature sensor initialization of the specified type for a specific VTM TS instance. VTM is a feature that is used to set control register, thermal shutdown range, Threshold values and interrupts

Parameters

  pConfig | [IN] Pointer to VTM TS configuration (optional)

Returns
  The SDL error code for the API. If pConfig is NULL: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_getTemp()

int32_t SDL_VTM_getTemp | ( | SDL_VTM_InstTs | instance,
|  | uint32_t * | pTempVal
| ) |  |

Read VTM Temperature sensor values in degree celcius.

Parameters

  instance | [IN] VTM Temperature sensor instance
  pTempVal | [OUT] Pointer to Temperature sensor values

Returns
  The SDL error code for the API. If pTempVal is NULL: SDL_EBADARGS If instance is invalid: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_setAlertTemp()

int32_t SDL_VTM_setAlertTemp | ( | SDL_VTM_InstTs | instance,
|  | int32_t | alert_th_hot,
|  | int32_t | alert_th_cold
| ) |  |

Set thresholds for temperature alerts.

Parameters

  instance | [IN] VTM Temperature sensor instance
  alert_th_hot | [IN] Alert hot temperature in milli degree celcius
  alert_th_cold | [IN] Alert cold temperature in milli degree celcius

Returns
  The SDL error code for the API. If instance is invalid: SDL_EBADARGS If temperatures are invalid: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_setTShutTemp()

int32_t SDL_VTM_setTShutTemp | ( | SDL_VTM_InstTs | instance,
|  | int32_t | tshut_th_hot,
|  | int32_t | tshut_th_cold
| ) |  |

Set thresholds for temperature Shutdown.

Parameters

  instance | [IN] VTM Temperature sensor instance
  tshut_th_hot | [IN] Shutdown hot temperature in milli degree celcius
  tshut_th_cold | [IN] Shutdown cold temperature in milli degree celcius

Returns
  The SDL error code for the API. If instance is invalid: SDL_EBADARGS If temperatures are invalid: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_setClearInterrupts()

int32_t SDL_VTM_setClearInterrupts | ( | SDL_VTM_InstTs | instance,
|  | uint8_t | hotintr,
|  | uint8_t | coldintr,
|  | uint8_t | lowthresholdintr
| ) |  |

API to set/Clear masks for generating interrupts.

Parameters

  instance | [IN] VTM Temperature sensor instance
  hotintr | [IN] Enable/disable hot interrupt.
  coldintr | [IN] Enable/disable cold interrupt.
  lowthresholdintr | [IN] Enable/disable low treshold interrupt.

Returns
  The SDL error code for the API. If instance is invalid: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_getSensorStatus()

int32_t SDL_VTM_getSensorStatus | ( | SDL_VTM_Stat_val * | pStat_val | ) |

Read VTM Temperature sensor status.

Parameters

  pStat_val | [OUT] Pointer to Temperature sensor status

Returns
  The SDL error code for the API. If pStat_val are NULL: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_enableTs()

void SDL_VTM_enableTs | ( | uint32_t | sensorSelect,
|  | uint8_t | delay
| ) |  |

Enable Required Temperature sensors.

Parameters

  sensorSelect | [IN] Enable configured sensors
  delay | [IN] delay between each read of temperature sensor. 0 is not valid value.

## ◆ SDL_VTM_enableTc()

void SDL_VTM_enableTc | ( | void |  | ) |

Enable Temperature Controller.

## ◆ SDL_VTM_disableTc()

void SDL_VTM_disableTc | ( | void |  | ) |

Disable Temperature Controller.

## ◆ SDL_VTM_getStaticRegistersTs()

int32_t SDL_VTM_getStaticRegistersTs | ( | SDL_VTM_staticRegsTs * | pStaticRegs | ) |

VTM Temperature sensor readback Static configuration registers.

Parameters

  pStaticRegs | [OUT] Pointer to VTM TS static register

Returns
  The SDL error code for the API. If pStaticRegs is NULL: SDL_EBADARGS If instance is invalid: SDL_EBADARGS Success: SDL_PASS

## ◆ SDL_VTM_enableESMWarmReset()

int32_t SDL_VTM_enableESMWarmReset | ( | SDL_VTM_InstTs | instance | ) |

Enable Warm Reset Generation.

Parameters

  instance | [IN] VTM Temperature sensor instance

Returns
  The SDL error code for the API. If instance is invalid: SDL_EBADARGS Success: SDL_PASS