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>
52 #include <soc.h>
53 
54 #if defined (SOC_J721E)
56 #endif
57 
58 #if defined (SOC_J7200)
59 #include <src/sdl/r5/j7200/sdl_soc_ccm.h>
60 #endif
61 
62 #if defined (SOC_J721S2)
63 #include <src/sdl/r5/j721s2/sdl_soc_ccm.h>
64 #endif
65 
66 #if defined (SOC_J784S4)
67 #include <src/sdl/r5/j784s4/sdl_soc_ccm.h>
68 #endif
69 
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73 
105 typedef enum {
117 
122 typedef enum {
132 
133 /* @} */
134 
146 typedef struct {
147  volatile uint32_t CCMKEYR1; /* MKEY1 value */
148  volatile uint32_t CCMKEYR2; /* MKEY2 value */
149  volatile uint32_t CCMKEYR3; /* MKEY3 value */
150  volatile uint32_t CCMPOLCNTRL; /* POL_INV value */
152 
157 typedef struct SDL_CCM_ErrorStatus_s
158 {
167 
168 /* @} */
169 
185 int32_t SDL_CCM_init(SDL_CCM_Inst instance);
186 
197  int32_t SDL_CCM_verifyConfig(SDL_CCM_Inst instance);
198 
223  int32_t SDL_CCM_selfTest(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType, SDL_CCM_SelfTestType testType, \
224  uint32_t polarityInversionMask, uint32_t timeoutCnt);
225 
241  int32_t SDL_CCM_injectError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
242 
260  int32_t SDL_CCM_getStaticRegisters(SDL_CCM_Inst instance, SDL_CCM_staticRegs *pStaticRegs);
261 
278  int32_t SDL_CCM_getErrorType(SDL_CCM_Inst instance, uint32_t intSrc, SDL_CCM_MonitorType *monitorType);
279 
293  int32_t SDL_CCM_clearError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
294 
295 /* @} */
296 
297 #ifdef __cplusplus
298 }
299 #endif /* extern "C" */
300 
301 #endif /* INCLUDE_SDL_CCM_H_ */
CCM Static Register.
Definition: sdl_ccm.h:146
Definition: sdl_ccm.h:106
Structure for CCM error status.
Definition: sdl_ccm.h:157
Definition: sdl_ccm.h:123
bool compareErrorFlag
Definition: sdl_ccm.h:159
volatile uint32_t CCMKEYR3
Definition: sdl_ccm.h:149
Definition: sdl_ccm.h:110
SDL_CCM_SelfTestType
This enumerator defines the type of CCM Self-test type.
Definition: sdl_ccm.h:122
int32_t SDL_CCM_init(SDL_CCM_Inst instance)
Initialization API for CCM module.
Definition: sdl_ccm.h:125
uint32_t SDL_CCM_Inst
Definition: sdl_soc_ccm.h:80
bool selfTestErrorFlag
Definition: sdl_ccm.h:161
SDL_CCM_MonitorType
This enumerator defines the type of CCM Monitor type.
Definition: sdl_ccm.h:105
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:127
bool selfTestErrorTypeFlag
Definition: sdl_ccm.h:163
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:147
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:129
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:150
volatile uint32_t CCMKEYR2
Definition: sdl_ccm.h:148
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:114
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,...