AM62Px MCU+ SDK  09.02.01
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 #include <sdl/include/soc_config.h>
52 #if defined (IP_VERSION_VTM_V0)
53 #include <sdl/vtm/v0/sdl_ip_vtm.h>
54 #endif
55 
82 typedef struct {
88  uint8_t vid_opp_val;
94 
100  typedef struct {
112 
121 typedef struct {
125  uint32_t vtm_vd_opp_vid;
129 
138 typedef struct {
140  uint32_t vtm_ts_ctrl2;
142  uint32_t vtm_ts_ctrl;
144  uint32_t vtm_ts_th;
146  uint32_t vtm_ts_th2;
148 
172 int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
173 
190 int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
191 
203 int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal);
204 
218  SDL_VTM_Stat_val *pStat_val);
219 
232 
244 int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
245 
257 int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
258 
271 
284 
285 
286 
287 #ifdef __cplusplus
288 }
289 #endif /* extern "C" */
290 
291 #endif /* end of SDL_VTM_H definition */
292 
SDL_VTM_staticRegsVd
VTM Static Registers for Voltage Domain.
Definition: sdl_vtm.h:121
SDL_VTM_configTs::tsCtrl_cfg
SDL_VTM_Ctrlcfg tsCtrl_cfg
Definition: sdl_vtm.h:104
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_configVd::vid_opp_val
uint8_t vid_opp_val
Definition: sdl_vtm.h:88
SDL_VTM_verifyConfigVd
int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain configures verification.
SDL_VTM_tsGlobal_cfg
VTM Global Configuration Registers.
Definition: sdl_ip_vtm.h:424
SDL_VTM_configTs::thr_val
SDL_VTM_tsThrVal thr_val
Definition: sdl_vtm.h:110
SDL_VTM_InstVd
SDL_VTM_InstVd
Definition: sdl_soc_vtm.h:107
SDL_VTM_configTs
VTM temperature sensor configuration.
Definition: sdl_vtm.h:100
SDL_VTM_InstTs
SDL_VTM_InstTs
Definition: sdl_soc_vtm.h:75
SDL_VTM_configVd::vid_opp
SDL_VTM_vid_opp vid_opp
Definition: sdl_vtm.h:86
SDL_VTM_vdEvtSel_set
uint16_t SDL_VTM_vdEvtSel_set
This enumerator define for VTM Voltage domain Event selection set.
Definition: sdl_ip_vtm.h:153
SDL_VTM_configVd::vd_temp_evts
SDL_VTM_vdEvtSel_set vd_temp_evts
Definition: sdl_vtm.h:90
SDL_VTM_configTsCtrl
uint8_t SDL_VTM_configTsCtrl
This enumerator define for VTM TS configuration valid map.
Definition: sdl_ip_vtm.h:79
SDL_VTM_Stat_read_ctrl
uint8_t SDL_VTM_Stat_read_ctrl
This enumerator define for VTM temperature sensor STAT read valid map.
Definition: sdl_ip_vtm.h:377
SDL_VTM_intrCtrl
uint16_t SDL_VTM_intrCtrl
This enumerator define for VTM Voltage domain threshold interrupt control.
Definition: sdl_ip_vtm.h:130
SDL_VTM_configTs::configTsCtrl
SDL_VTM_configTsCtrl configTsCtrl
Definition: sdl_vtm.h:102
SDL_VTM_configVd::tsGlobal_cfg
SDL_VTM_tsGlobal_cfg tsGlobal_cfg
Definition: sdl_vtm.h:92
SDL_VTM_verifyConfigTs
int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor configures verification.
SDL_VTM_staticRegsVd::vtm_vd_evt_sel_ctrl
uint32_t vtm_vd_evt_sel_ctrl
Definition: sdl_vtm.h:123
SDL_VTM_staticRegsTs::vtm_ts_ctrl2
uint32_t vtm_ts_ctrl2
Definition: sdl_vtm.h:140
SDL_VTM_initVd
int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain initialization.
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::high_temp_in_milli_degree_celsius
int32_t high_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:106
SDL_VTM_Ctrlcfg
VTM temperature sensor band gap control.
Definition: sdl_ip_vtm.h:462
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:138
SDL_VTM_configTs::low_temp_in_milli_degree_celsius
int32_t low_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:108
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_staticRegsTs::vtm_ts_th2
uint32_t vtm_ts_th2
Definition: sdl_vtm.h:146
sdl_ip_vtm.h
SDL_VTM_initTs
int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor initialization.
SDL_VTM_tsThrVal
VTM temperature sensor threshold values.
Definition: sdl_ip_vtm.h:489
SDL_VTM_configVd
VTM Voltage Domain configuration.
Definition: sdl_vtm.h:82
SDL_VTM_staticRegsVd::vtm_vd_opp_vid
uint32_t vtm_vd_opp_vid
Definition: sdl_vtm.h:125
SDL_VTM_staticRegsVd::vtm_global_cfg
SDL_VTM_tsGlobal_cfg vtm_global_cfg
Definition: sdl_vtm.h:127
SDL_VTM_Stat_val
VTM temperature sensor Stat values.
Definition: sdl_ip_vtm.h:512
SDL_VTM_staticRegsTs::vtm_ts_ctrl
uint32_t vtm_ts_ctrl
Definition: sdl_vtm.h:142
SDL_VTM_configVd::configVdCtrl
SDL_VTM_configVdCtrl configVdCtrl
Definition: sdl_vtm.h:84
SDL_VTM_vid_opp
uint8_t SDL_VTM_vid_opp
This enumerator defines the possible VID Codes to set various voltage domain supply voltages.
Definition: sdl_ip_vtm.h:93
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_staticRegsTs::vtm_ts_th
uint32_t vtm_ts_th
Definition: sdl_vtm.h:144
SDL_VTM_configVdCtrl
uint8_t SDL_VTM_configVdCtrl
This enumerator define forVTM VD configuration valid map.
Definition: sdl_ip_vtm.h:67