AM263x MCU+ SDK  08.05.00
sdl_ip_ccm.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2022 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  */
50 #ifndef SDL_IP_CCM_H_
51 #define SDL_IP_CCM_H_
52 
53 #include <stddef.h>
54 #include <stdbool.h>
55 #include "sdl/sdl_ccm.h"
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* ========================================================================== */
62 /* Enums & Typedefs */
63 /* ========================================================================== */
64 
69 typedef enum {
81 
86 typedef enum {
96 
97 
104 typedef struct {
105  volatile uint32_t CCMKEYR1; /* MKEY1 value */
106  volatile uint32_t CCMKEYR2; /* MKEY2 value */
107  volatile uint32_t CCMKEYR3; /* MKEY3 value */
108  volatile uint32_t CCMPOLCNTRL; /* POL_INV value */
110 
115 typedef struct SDL_CCM_ErrorStatus_s
116 {
125 /* ========================================================================== */
126 /* Function Declarations */
127 /* ========================================================================== */
128 
139 int32_t SDL_CCM_init(SDL_CCM_Inst instance);
140 
152 
177  int32_t SDL_CCM_selfTest(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType, SDL_CCM_SelfTestType testType, \
178  uint32_t polarityInversionMask, uint32_t timeoutCnt);
179 
195  int32_t SDL_CCM_injectError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
196 
215 
232  int32_t SDL_CCM_getErrorType(SDL_CCM_Inst instance, uint32_t intSrc, SDL_CCM_MonitorType *monitorType);
233 
247  int32_t SDL_CCM_clearError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType);
248 
249 #ifdef __cplusplus
250 }
251 #endif /*extern "C" */
252 #endif
253 
SDL_CCM_ErrorStatus_t::selfTestErrorFlag
bool selfTestErrorFlag
Definition: sdl_ip_ccm.h:119
SDL_CCM_MONITOR_TYPE_OUTPUT_COMPARE_BLOCK
@ SDL_CCM_MONITOR_TYPE_OUTPUT_COMPARE_BLOCK
Definition: sdl_ip_ccm.h:72
SDL_CCM_SELFTEST_TYPE_INVALID
@ SDL_CCM_SELFTEST_TYPE_INVALID
Definition: sdl_ip_ccm.h:93
SDL_CCM_staticRegs
CCM Static Register.
Definition: sdl_ip_ccm.h:104
SDL_CCM_ErrorStatus_t::compareErrorFlag
bool compareErrorFlag
Definition: sdl_ip_ccm.h:117
SDL_CCM_staticRegs::CCMKEYR3
volatile uint32_t CCMKEYR3
Definition: sdl_ip_ccm.h:107
SDL_CCM_SelfTestType
SDL_CCM_SelfTestType
This enumerator defines the type of CCM Self-test type.
Definition: sdl_ip_ccm.h:86
SDL_CCM_ErrorStatus_t::selfTestErrorTypeFlag
bool selfTestErrorTypeFlag
Definition: sdl_ip_ccm.h:121
SDL_CCM_MONITOR_TYPE_VIM
@ SDL_CCM_MONITOR_TYPE_VIM
Definition: sdl_ip_ccm.h:74
SDL_CCM_MONITOR_TYPE_INVALID
@ SDL_CCM_MONITOR_TYPE_INVALID
Definition: sdl_ip_ccm.h:78
SDL_CCM_staticRegs::CCMKEYR1
volatile uint32_t CCMKEYR1
Definition: sdl_ip_ccm.h:105
SDL_CCM_ErrorStatus_t
Structure for CCM error status.
Definition: sdl_ip_ccm.h:116
SDL_CCM_init
int32_t SDL_CCM_init(SDL_CCM_Inst instance)
Initialization API for CCM module.
SDL_CCM_MONITOR_TYPE_NONE
@ SDL_CCM_MONITOR_TYPE_NONE
Definition: sdl_ip_ccm.h:70
SDL_CCM_staticRegs::CCMKEYR2
volatile uint32_t CCMKEYR2
Definition: sdl_ip_ccm.h:106
SDL_CCM_SELFTEST_TYPE_NORMAL
@ SDL_CCM_SELFTEST_TYPE_NORMAL
Definition: sdl_ip_ccm.h:87
SDL_CCM_selfTest
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 ...
SDL_CCM_MONITOR_TYPE_INACTIVITY_MONITOR
@ SDL_CCM_MONITOR_TYPE_INACTIVITY_MONITOR
Definition: sdl_ip_ccm.h:76
SDL_CCM_SELFTEST_POLARITY_INVERSION
@ SDL_CCM_SELFTEST_POLARITY_INVERSION
Definition: sdl_ip_ccm.h:91
sdl_ccm.h
SDL_CCM_getErrorType
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.
SDL_CCM_getStaticRegisters
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...
SDL_CCM_MonitorType
SDL_CCM_MonitorType
This enumerator defines the type of CCM Monitor type.
Definition: sdl_ip_ccm.h:69
SDL_CCM_verifyConfig
int32_t SDL_CCM_verifyConfig(SDL_CCM_Inst instance)
Verifies the configuration done as part of SDL_CCM_init is as expected.
SDL_CCM_injectError
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,...
SDL_CCM_SELFTEST_TYPE_ERROR_FORCING
@ SDL_CCM_SELFTEST_TYPE_ERROR_FORCING
Definition: sdl_ip_ccm.h:89
SDL_CCM_clearError
int32_t SDL_CCM_clearError(SDL_CCM_Inst instance, SDL_CCM_MonitorType monitorType)
Clears the compare error for the selected monitor type.
SDL_CCM_staticRegs::CCMPOLCNTRL
volatile uint32_t CCMPOLCNTRL
Definition: sdl_ip_ccm.h:108
SDL_CCM_Inst
uint32_t SDL_CCM_Inst
CCM Instance supported.
Definition: sdl_soc_ccm.h:65