AM62Px MCU+ SDK  09.02.01
safety_checkers_rm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2024 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 
46 #ifndef SAFETY_CHECKERS_RM_H_
47 #define SAFETY_CHECKERS_RM_H_
48 
49 /* ========================================================================== */
50 /* Include Files */
51 /* ========================================================================== */
52 
53 /* None */
54 
55 #ifdef __cplusplus
56 extern "C" {
57 #endif
58 
66 /* ========================================================================== */
67 /* Macros & Typedefs */
68 /* ========================================================================== */
69 
71 #define SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP (20U)
72 
75 /* ========================================================================== */
76 /* Global Variables */
77 /* ========================================================================== */
78 
79 /* None */
80 
88 /* ========================================================================== */
89 /* Structure Declarations */
90 /* ========================================================================== */
91 
98 typedef struct
99 {
100  /* Base address of register region */
101  uint32_t baseAddr;
102  /* Number of different registers in a memory region */
103  uint32_t regNum;
104  /* Total number of registers in a register group */
105  uint32_t regArrayLen;
106  /* Start address of register group */
107  uint32_t regStartOffset;
108  /* Block Offset Value for register group */
109  uint32_t regOffsetArr [SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP];
111 
114 /* ========================================================================== */
115 /* Internal/Private Function Declarations */
116 /* ========================================================================== */
117 
118 /* None */
119 
127 /* ========================================================================== */
128 /* Function Declarations */
129 /* ========================================================================== */
130 
147 int32_t SafetyCheckers_rmGetRegCfg(uintptr_t *rmRegCfg, uint32_t size);
148 
163 int32_t SafetyCheckers_rmVerifyRegCfg(const uintptr_t *rmRegCfg, uint32_t size);
164 
167 /* ========================================================================== */
168 /* Static Function Definitions */
169 /* ========================================================================== */
170 
171 /* None */
172 
173 #ifdef __cplusplus
174 }
175 #endif
176 
177 #endif /* #ifndef SAFETY_CHECKERS_RM_H_ */
SafetyCheckers_RmRegData::regStartOffset
uint32_t regStartOffset
Definition: safety_checkers_rm.h:107
size
uint16_t size
Definition: tisci_boardcfg.h:1
SafetyCheckers_RmRegData::baseAddr
uint32_t baseAddr
Definition: safety_checkers_rm.h:101
SafetyCheckers_RmRegData::regNum
uint32_t regNum
Definition: safety_checkers_rm.h:103
SafetyCheckers_rmGetRegCfg
int32_t SafetyCheckers_rmGetRegCfg(uintptr_t *rmRegCfg, uint32_t size)
API to get the register value for all the RM control modules E.g. When the RM register configuration ...
SafetyCheckers_RmRegData
Structure to hold the base address and the register details of RM control module registers.
Definition: safety_checkers_rm.h:99
SafetyCheckers_rmVerifyRegCfg
int32_t SafetyCheckers_rmVerifyRegCfg(const uintptr_t *rmRegCfg, uint32_t size)
API to read back and compare the RM control module registers data E.g. When the RM verify register ...
SafetyCheckers_RmRegData::regArrayLen
uint32_t regArrayLen
Definition: safety_checkers_rm.h:105
SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP
#define SAFETY_CHECKERS_RM_MAX_REG_PER_GROUP
Maximum number of registers in a register group.
Definition: safety_checkers_rm.h:71