SDL API Guide for J7200
sdl_vtm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 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 <src/ip/sdlr_vtm.h>
52 #include <src/ip/sdl_ip_vtm.h>
53 
81 typedef struct {
87  uint8_t vid_opp_val;
93 
99  typedef struct {
111 
120 typedef struct {
124  uint32_t vtm_vd_opp_vid;
128 
137 typedef struct {
139  uint32_t vtm_ts_ctrl2;
141  uint32_t vtm_ts_ctrl;
143  uint32_t vtm_ts_th;
145  uint32_t vtm_ts_th2;
147 
148 /* @} */
149 
171 int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
172 
189 int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
190 
202 int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal);
203 
216 int32_t SDL_VTM_getSensorStatus(SDL_VTM_InstTs instance, const SDL_VTM_Stat_read_ctrl *pCtrl, \
217  SDL_VTM_Stat_val *pStat_val);
218 
230 int32_t SDL_VTM_intrCntrl(SDL_VTM_InstVd instance, SDL_VTM_intrCtrl intrCtrl);
231 
243 int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
244 
256 int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
257 
270 
283 
284 
285 
286 /* @} */
287 #ifdef __cplusplus
288 }
289 #endif /* extern "C" */
290 
291 #endif /* end of SDL_VTM_H definition */
uint8_t SDL_VTM_configVdCtrl
Definition: sdl_ip_vtm.h:88
VTM Voltage Domain configuration.
Definition: sdl_vtm.h:81
int32_t SDL_VTM_intrCntrl(SDL_VTM_InstVd instance, SDL_VTM_intrCtrl intrCtrl)
Set maximum Threshold values of VTM Temperature sensor.
SDL_VTM_InstVd
Definition: sdl_soc_vtm.h:109
uint32_t vtm_ts_th
Definition: sdl_vtm.h:143
SDL_VTM_tsThrVal thr_val
Definition: sdl_vtm.h:109
SDL_VTM_tsGlobal_cfg tsGlobal_cfg
Definition: sdl_vtm.h:91
int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain configures verification.
VTM Static Registers for Temperature sensor.
Definition: sdl_vtm.h:137
VTM temperature sensor configuration.
Definition: sdl_vtm.h:99
uint32_t vtm_ts_ctrl2
Definition: sdl_vtm.h:139
SDL_VTM_configVdCtrl configVdCtrl
Definition: sdl_vtm.h:83
uint32_t vtm_vd_evt_sel_ctrl
Definition: sdl_vtm.h:122
SDL_VTM_vid_opp vid_opp
Definition: sdl_vtm.h:85
int32_t low_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:107
int32_t SDL_VTM_getStaticRegistersTs(SDL_VTM_InstTs instance, SDL_VTM_staticRegsTs *pStaticRegs)
VTM Temperature sensor readback Static configuration registers.
VTM temperature sensor Stat values.
Definition: sdl_ip_vtm.h:623
uint8_t SDL_VTM_Stat_read_ctrl
Definition: sdl_ip_vtm.h:478
int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor configures verification.
uint32_t vtm_ts_th2
Definition: sdl_vtm.h:145
uint8_t vid_opp_val
Definition: sdl_vtm.h:87
VTM Static Registers for Voltage Domain.
Definition: sdl_vtm.h:120
int32_t SDL_VTM_getStaticRegistersVd(SDL_VTM_InstVd instance, SDL_VTM_staticRegsVd *pStaticRegs)
VTM Voltage Domain readback Static configuration registers.
VTM temperature sensor band gap control.
Definition: sdl_ip_vtm.h:573
VTM temperature sensor threshold values.
Definition: sdl_ip_vtm.h:600
uint32_t vtm_ts_ctrl
Definition: sdl_vtm.h:141
uint16_t SDL_VTM_intrCtrl
Definition: sdl_ip_vtm.h:172
int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor initialization.
SDL_VTM_configTsCtrl configTsCtrl
Definition: sdl_vtm.h:101
int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain initialization.
uint16_t SDL_VTM_vdEvtSel_set
Definition: sdl_ip_vtm.h:199
int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal)
Read VTM Temperature sensor values in degree celcius.
SDL_VTM_tsGlobal_cfg vtm_global_cfg
Definition: sdl_vtm.h:126
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_Ctrlcfg tsCtrl_cfg
Definition: sdl_vtm.h:103
SDL_VTM_InstTs
Definition: sdl_soc_vtm.h:77
uint8_t SDL_VTM_vid_opp
Definition: sdl_ip_vtm.h:124
VTM Global Configuration Registers.
Definition: sdl_ip_vtm.h:535
uint32_t vtm_vd_opp_vid
Definition: sdl_vtm.h:124
int32_t high_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:105
SDL_VTM_vdEvtSel_set vd_temp_evts
Definition: sdl_vtm.h:89
uint8_t SDL_VTM_configTsCtrl
Definition: sdl_ip_vtm.h:106