SDL API Guide for J7200
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>
52 #include <soc.h>
53 
54 #if defined (SOC_J721E)
55 #include <src/sdl/r5/j721e/sdl_soc_ccm.h>
56 #endif
57 
58 #if defined (SOC_J7200)
60 #endif
61 
62 #ifdef __cplusplus
63 extern "C" {
64 #endif
65 
97 typedef enum {
109 
114 typedef enum {
124 
125 /* @} */
126 
138 typedef struct {
139  volatile uint32_t CCMKEYR1; /* MKEY1 value */
140  volatile uint32_t CCMKEYR2; /* MKEY2 value */
141  volatile uint32_t CCMKEYR3; /* MKEY3 value */
142  volatile uint32_t CCMPOLCNTRL; /* POL_INV value */
144 
149 typedef struct SDL_CCM_ErrorStatus_s
150 {
159 
160 /* @} */
161 
177 int32_t SDL_CCM_init(SDL_CCM_Inst instance);
178 
189  int32_t SDL_CCM_verifyConfig(SDL_CCM_Inst instance);
190 
215  int32_t SDL_CCM_selfTest(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType, SDL_CCM_SelfTestType testType, \
216  uint32_t polarityInversionMask, uint32_t timeoutCnt);
217 
233  int32_t SDL_CCM_injectError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
234 
252  int32_t SDL_CCM_getStaticRegisters(SDL_CCM_Inst instance, SDL_CCM_staticRegs *pStaticRegs);
253 
270  int32_t SDL_CCM_getErrorType(SDL_CCM_Inst instance, uint32_t intSrc, SDL_CCM_MonitorType *monitorType);
271 
285  int32_t SDL_CCM_clearError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
286 
287 /* @} */
288 
289 #ifdef __cplusplus
290 }
291 #endif /* extern "C" */
292 
293 #endif /* INCLUDE_SDL_CCM_H_ */
CCM Static Register.
Definition: sdl_ccm.h:138
Definition: sdl_ccm.h:98
Structure for CCM error status.
Definition: sdl_ccm.h:149
Definition: sdl_ccm.h:115
bool compareErrorFlag
Definition: sdl_ccm.h:151
volatile uint32_t CCMKEYR3
Definition: sdl_ccm.h:141
Definition: sdl_ccm.h:102
SDL_CCM_SelfTestType
This enumerator defines the type of CCM Self-test type.
Definition: sdl_ccm.h:114
int32_t SDL_CCM_init(SDL_CCM_Inst instance)
Initialization API for CCM module.
Definition: sdl_ccm.h:117
uint32_t SDL_CCM_Inst
Definition: sdl_soc_ccm.h:79
bool selfTestErrorFlag
Definition: sdl_ccm.h:153
SDL_CCM_MonitorType
This enumerator defines the type of CCM Monitor type.
Definition: sdl_ccm.h:97
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:119
bool selfTestErrorTypeFlag
Definition: sdl_ccm.h:155
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:139
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:121
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:142
volatile uint32_t CCMKEYR2
Definition: sdl_ccm.h:140
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:106
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...