SDL API Guide for J721E
sdl_ccm.h
Go to the documentation of this file.
1 /*
2  * SDL CCM
3  *
4  * Software Diagnostics Library module for CCM module
5  *
6  * Copyright (c) Texas Instruments Incorporated 2019-2021
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in the
17  * documentation and/or other materials provided with the
18  * distribution.
19  *
20  * Neither the name of Texas Instruments Incorporated nor the names of
21  * its contributors may be used to endorse or promote products derived
22  * from this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35  *
36  */
37 
47 #ifndef INCLUDE_SDL_CCM_H_
48 #define INCLUDE_SDL_CCM_H_
49 
50 #include <src/sdl/sdl_types.h>
51 #include <src/sdl/tistdtypes.h>
53 #include <soc.h>
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
90 typedef enum {
102 
107 typedef enum {
117 
118 /* @} */
119 
131 typedef struct {
132  volatile uint32_t CCMKEYR1; /* MKEY1 value */
133  volatile uint32_t CCMKEYR2; /* MKEY2 value */
134  volatile uint32_t CCMKEYR3; /* MKEY3 value */
135  volatile uint32_t CCMPOLCNTRL; /* POL_INV value */
137 
142 typedef struct SDL_CCM_ErrorStatus_s
143 {
152 
153 /* @} */
154 
170 int32_t SDL_CCM_init(SDL_CCM_Inst instance);
171 
182  int32_t SDL_CCM_verifyConfig(SDL_CCM_Inst instance);
183 
208  int32_t SDL_CCM_selfTest(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType, SDL_CCM_SelfTestType testType, \
209  uint32_t polarityInversionMask, uint32_t timeoutCnt);
210 
226  int32_t SDL_CCM_injectError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
227 
245  int32_t SDL_CCM_getStaticRegisters(SDL_CCM_Inst instance, SDL_CCM_staticRegs *pStaticRegs);
246 
263  int32_t SDL_CCM_getErrorType(SDL_CCM_Inst instance, uint32_t intSrc, SDL_CCM_MonitorType *monitorType);
264 
278  int32_t SDL_CCM_clearError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
279 
280 /* @} */
281 
282 #ifdef __cplusplus
283 }
284 #endif /* extern "C" */
285 
286 #endif /* INCLUDE_SDL_CCM_H_ */
CCM Static Register.
Definition: sdl_ccm.h:131
Definition: sdl_ccm.h:91
Structure for CCM error status.
Definition: sdl_ccm.h:142
Definition: sdl_ccm.h:108
bool compareErrorFlag
Definition: sdl_ccm.h:144
volatile uint32_t CCMKEYR3
Definition: sdl_ccm.h:134
Definition: sdl_ccm.h:95
SDL_CCM_SelfTestType
This enumerator defines the type of CCM Self-test type.
Definition: sdl_ccm.h:107
int32_t SDL_CCM_init(SDL_CCM_Inst instance)
Initialization API for CCM module.
Definition: sdl_ccm.h:110
uint32_t SDL_CCM_Inst
Definition: sdl_soc_ccm.h:80
bool selfTestErrorFlag
Definition: sdl_ccm.h:146
SDL_CCM_MonitorType
This enumerator defines the type of CCM Monitor type.
Definition: sdl_ccm.h:90
int32_t SDL_CCM_clearError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType)
Clears the compare error for the selected monitor type.
Definition: sdl_ccm.h:112
bool selfTestErrorTypeFlag
Definition: sdl_ccm.h:148
int32_t SDL_CCM_selfTest(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType, SDL_CCM_SelfTestType testType, uint32_t polarityInversionMask, uint32_t timeoutCnt)
Executes a self-test of the CCM module. The types of self-tests supported are described in detail in ...
volatile uint32_t CCMKEYR1
Definition: sdl_ccm.h:132
int32_t SDL_CCM_getErrorType(SDL_CCM_Inst instance, uint32_t intSrc, SDL_CCM_MonitorType *monitorType)
Gets the monitor type for which the CCM error was generated. Takes the ESM interrupt source as input...
Definition: sdl_ccm.h:114
This file contains SOC specific defintions.
int32_t SDL_CCM_verifyConfig(SDL_CCM_Inst instance)
Verifies the configuration done as part of SDL_CCM_init is as expected.
volatile uint32_t CCMPOLCNTRL
Definition: sdl_ccm.h:135
volatile uint32_t CCMKEYR2
Definition: sdl_ccm.h:133
int32_t SDL_CCM_getStaticRegisters(SDL_CCM_Inst instance, SDL_CCM_staticRegs *pStaticRegs)
Retrieves the static register configuration. The values returned in staticRegs can be saved by the ap...
Definition: sdl_ccm.h:99
int32_t SDL_CCM_injectError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType)
Forces an error to be generated for the selected monitor type. After injecting the error...