AM64x MCU+ SDK  08.06.00
sdl_vtm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Texas Instruments Incorporated.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 
42 #ifndef SDL_VTM_H
43 #define SDL_VTM_H
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 #include <stdint.h>
50 #include <stdbool.h>
51 
52 #include <sdl/include/soc_config.h>
53 
54 #if defined (IP_VERSION_VTM_V0)
55 #include <sdl/vtm/v0/sdlr_vtm.h>
56 #include <sdl/vtm/v0/sdl_ip_vtm.h>
57 #endif
58 
87 typedef struct {
93  uint8_t vid_opp_val;
99 
105  typedef struct {
117 
126 typedef struct {
130  uint32_t vtm_vd_opp_vid;
134 
143 typedef struct {
145  uint32_t vtm_ts_ctrl2;
147  uint32_t vtm_ts_ctrl;
149  uint32_t vtm_ts_th;
151  uint32_t vtm_ts_th2;
153 
154 
177 int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
178 
195 int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
196 
208 int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal);
209 
223  SDL_VTM_Stat_val *pStat_val);
224 
237 
249 int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
250 
262 int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
263 
276 
289 
290 
291 
292 #ifdef __cplusplus
293 }
294 #endif /* extern "C" */
295 
296 #endif /* end of SDL_VTM_H definition */
SDL_VTM_staticRegsVd
VTM Static Registers for Voltage Domain.
Definition: sdl_vtm.h:126
SDL_VTM_configTs::tsCtrl_cfg
SDL_VTM_Ctrlcfg tsCtrl_cfg
Definition: sdl_vtm.h:109
SDL_VTM_initTs
int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor initialization.
SDL_VTM_vdEvtSel_set
uint16_t SDL_VTM_vdEvtSel_set
Definition: sdl_ip_vtm.h:172
SDL_VTM_configVd::vid_opp_val
uint8_t vid_opp_val
Definition: sdl_vtm.h:93
SDL_VTM_tsGlobal_cfg
VTM Global Configuration Registers.
Definition: sdl_ip_vtm.h:464
SDL_VTM_configTs::thr_val
SDL_VTM_tsThrVal thr_val
Definition: sdl_vtm.h:115
SDL_VTM_verifyConfigVd
int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain configures verification.
SDL_VTM_InstVd
SDL_VTM_InstVd
Definition: sdl_soc_vtm.h:108
SDL_VTM_getStaticRegistersVd
int32_t SDL_VTM_getStaticRegistersVd(SDL_VTM_InstVd instance, SDL_VTM_staticRegsVd *pStaticRegs)
VTM Voltage Domain readback Static configuration registers.
SDL_VTM_configTs
VTM temperature sensor configuration.
Definition: sdl_vtm.h:105
SDL_VTM_InstTs
SDL_VTM_InstTs
Definition: sdl_soc_vtm.h:76
SDL_VTM_configVd::vid_opp
SDL_VTM_vid_opp vid_opp
Definition: sdl_vtm.h:91
SDL_VTM_configVd::vd_temp_evts
SDL_VTM_vdEvtSel_set vd_temp_evts
Definition: sdl_vtm.h:95
SDL_VTM_configTs::configTsCtrl
SDL_VTM_configTsCtrl configTsCtrl
Definition: sdl_vtm.h:107
SDL_VTM_configVd::tsGlobal_cfg
SDL_VTM_tsGlobal_cfg tsGlobal_cfg
Definition: sdl_vtm.h:97
SDL_VTM_intrCtrl
uint16_t SDL_VTM_intrCtrl
Definition: sdl_ip_vtm.h:148
SDL_VTM_staticRegsVd::vtm_vd_evt_sel_ctrl
uint32_t vtm_vd_evt_sel_ctrl
Definition: sdl_vtm.h:128
SDL_VTM_staticRegsTs::vtm_ts_ctrl2
uint32_t vtm_ts_ctrl2
Definition: sdl_vtm.h:145
sdlr_vtm.h
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_initVd
int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain initialization.
SDL_VTM_configTs::high_temp_in_milli_degree_celsius
int32_t high_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:111
SDL_VTM_Ctrlcfg
VTM temperature sensor band gap control.
Definition: sdl_ip_vtm.h:502
SDL_VTM_getStaticRegistersTs
int32_t SDL_VTM_getStaticRegistersTs(SDL_VTM_InstTs instance, SDL_VTM_staticRegsTs *pStaticRegs)
VTM Temperature sensor readback Static configuration registers.
SDL_VTM_verifyConfigTs
int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor configures verification.
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_staticRegsTs
VTM Static Registers for Temperature sensor.
Definition: sdl_vtm.h:143
SDL_VTM_configTs::low_temp_in_milli_degree_celsius
int32_t low_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:113
SDL_VTM_Stat_read_ctrl
uint8_t SDL_VTM_Stat_read_ctrl
Definition: sdl_ip_vtm.h:416
SDL_VTM_staticRegsTs::vtm_ts_th2
uint32_t vtm_ts_th2
Definition: sdl_vtm.h:151
sdl_ip_vtm.h
SDL_VTM_getTemp
int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal)
Read VTM Temperature sensor values in degree celcius.
SDL_VTM_tsThrVal
VTM temperature sensor threshold values.
Definition: sdl_ip_vtm.h:529
SDL_VTM_configTsCtrl
uint8_t SDL_VTM_configTsCtrl
Definition: sdl_ip_vtm.h:93
SDL_VTM_configVd
VTM Voltage Domain configuration.
Definition: sdl_vtm.h:87
SDL_VTM_configVdCtrl
uint8_t SDL_VTM_configVdCtrl
This enumerator define forVTM VD configuration valid map.
Definition: sdl_ip_vtm.h:80
SDL_VTM_staticRegsVd::vtm_vd_opp_vid
uint32_t vtm_vd_opp_vid
Definition: sdl_vtm.h:130
SDL_VTM_staticRegsVd::vtm_global_cfg
SDL_VTM_tsGlobal_cfg vtm_global_cfg
Definition: sdl_vtm.h:132
SDL_VTM_Stat_val
VTM temperature sensor Stat values.
Definition: sdl_ip_vtm.h:552
SDL_VTM_staticRegsTs::vtm_ts_ctrl
uint32_t vtm_ts_ctrl
Definition: sdl_vtm.h:147
SDL_VTM_configVd::configVdCtrl
SDL_VTM_configVdCtrl configVdCtrl
Definition: sdl_vtm.h:89
SDL_VTM_vid_opp
uint8_t SDL_VTM_vid_opp
Definition: sdl_ip_vtm.h:108
SDL_VTM_staticRegsTs::vtm_ts_th
uint32_t vtm_ts_th
Definition: sdl_vtm.h:149