1 /*
2  * Copyright 2022 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef SWT_IP_CFG_DEFINES_H
8 #define SWT_IP_CFG_DEFINES_H
9 
10 /**
11 *   @file
12 *
13 *   @addtogroup Swt
14 *   @{
15 */
16 
17 #ifdef __cplusplus
18 extern "C"{
19 #endif
20 
21 
22 /*==================================================================================================
23 *                                          INCLUDE FILES
24 * 1) system and project includes
25 * 2) needed interfaces from external units
26 * 3) internal and external interfaces from this unit
27 ==================================================================================================*/
28 
29 #include "StandardTypes.h"
30 
31 /*==================================================================================================
32 *                                 SOURCE FILE VERSION INFORMATION
33 ==================================================================================================*/
34 
35 #define SWT_IP_CFG_DEFINES_VENDOR_ID                    43
36 #define SWT_IP_CFG_DEFINES_MODULE_ID                    102
37 #define SWT_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION     4
38 #define SWT_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION     7
39 #define SWT_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION  0
40 #define SWT_IP_CFG_DEFINES_SW_MAJOR_VERSION             0
41 #define SWT_IP_CFG_DEFINES_SW_MINOR_VERSION             9
42 #define SWT_IP_CFG_DEFINES_SW_PATCH_VERSION             0
43 
44 /*==================================================================================================
45 *                                       FILE VERSION CHECKS
46 ==================================================================================================*/
47 
48 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
49     /* Check if current file and SchM_Wdg header file are of the same Autosar version */
50     #if ((SWT_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION    != STD_AR_RELEASE_MAJOR_VERSION) || \
51         (SWT_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION     != STD_AR_RELEASE_MINOR_VERSION))
52     #error "AutoSar Version Numbers of Swt_Ip_Cfg_Defines.h and StandardTypes.h are different"
53     #endif
54 #endif /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
55 
56 /*==================================================================================================
57 *                                            CONSTANTS
58 ==================================================================================================*/
59 
60 /*==================================================================================================
61 *                                       DEFINES AND MACROS
62 ==================================================================================================*/
63 
64 /**
65 * @brief  Enable available Swt instances on platform
66 */
67 #define SWT_IP_ENABLE_INSTANCE0 (STD_ON)
68 #define SWT_IP_ENABLE_INSTANCE1 (STD_ON)
69 #define SWT_IP_ENABLE_INSTANCE2 (STD_ON)
70 #define SWT_IP_ENABLE_INSTANCE3 (STD_ON)
71 #define SWT_IP_ENABLE_INSTANCE4 (STD_ON)
72 #define SWT_IP_ENABLE_INSTANCE5 (STD_ON)
73 #define SWT_IP_ENABLE_INSTANCE6 (STD_ON)
74 #define SWT_IP_ENABLE_INSTANCE7 (STD_ON)
75 #define SWT_IP_ENABLE_INSTANCE8 (STD_ON)
76 #define SWT_IP_ENABLE_INSTANCE9 (STD_ON)
77 #define SWT_IP_ENABLE_INSTANCE10 (STD_ON)
78 #define SWT_IP_ENABLE_INSTANCE11 (STD_ON)
79 #define SWT_IP_ENABLE_INSTANCE12 (STD_ON)
80 
81 /**
82 * @brief  This variable will indicate if the Wdg Development Error Detect feature is activated
83 */
84 #define SWT_IP_DEV_ERROR_DETECT (STD_OFF)
85 
86 /**
87 * @brief  This variable will indicate if the Wdg Disable Allowed feature is activated
88 */
89 #define SWT_IP_DEINIT (STD_ON)
90 
91 /**
92 * @brief  Define indicating for which Swt instances the Clear Reset Request feature is supported
93 */
94 #define SWT_IP_CLEAR_RESET_REQUEST (STD_OFF)
95 /**
96 * @brief  This variable will indicate if the ISR for SWT instances is used
97 */
98 #define SWT_IP_ISR0_USED (STD_ON)
99 #define SWT_IP_ISR1_USED (STD_ON)
100 #define SWT_IP_ISR2_USED (STD_ON)
101 #define SWT_IP_ISR3_USED (STD_ON)
102 #define SWT_IP_ISR4_USED (STD_ON)
103 #define SWT_IP_ISR5_USED (STD_ON)
104 #define SWT_IP_ISR6_USED (STD_ON)
105 #define SWT_IP_ISR7_USED (STD_ON)
106 #define SWT_IP_ISR8_USED (STD_ON)
107 #define SWT_IP_ISR9_USED (STD_ON)
108 #define SWT_IP_ISR10_USED (STD_ON)
109 #define SWT_IP_ISR11_USED (STD_ON)
110 #define SWT_IP_ISR12_USED (STD_ON)
111 
112 
113 /**
114 * @brief  Define a certain timeout method from OsIf will be used in the driver
115 */
116 #define SWT_IP_TIMEOUT_METHOD     (OSIF_COUNTER_DUMMY)
117 #define SWT_IP_OSIF_TIMEOUT_VAL     (3000)
118 /**
119 * @brief  This variable will indicate RAM/ROM execution
120 */
121 #define WDG_RAM (0U)
122 /**
123 * @brief  This constant specifies the minimum value that will be set in the SWT timeout register
124 */
125 #define SWT_MIN_VALUE_TIMEOUT_U32 ((uint32)0x100)
126 /**
127 * @brief This constant define value of SWT_IP_RRR_SUPPORT
128 */
129 /**
130 * @brief This constant define value of SWT_IP_DISCOUNTINUOUS_INSTANCE_IDS
131 */
132 #define SWT_IP_DISCOUNTINUOUS_INSTANCE_IDS  (STD_OFF)
133 /**
134 * @brief  Support for running in stop mode
135 */
136 #define SWT_IP_HAS_STOP_MODE  (1U)
137 /**
138 * @brief  Support for clear reset request
139 */
140 #define SWT_IP_HAS_CLEAR_RESET  (1U)
141 /**
142 * @brief  Support for Self Reset
143 */
144 #define SWT_IP_RRR_SUPPORT  (0x00001FFFUL)
145 /**
146 * @brief  The key values to clear Soft Lock bit
147 */
148 #define SWT_IP_UNLOCK_VALUE1_U16  (0xC520U)
149 #define SWT_IP_UNLOCK_VALUE2_U16  (0xD928U)
150 /**
151 * @brief  The key values used for resetting the SWT counter in Fixed Service Sequence Mode
152 */
153 #define SWT_IP_FIXED_SERVICE_VALUE1_U16  (0xA602U)
154 #define SWT_IP_FIXED_SERVICE_VALUE2_U16  (0xB480U)
155 /**
156 * @brief  The reset value of the control register
157 */
158 #define SWT_IP_CR_RESET_VALUE_U32  (0xFF00010AU)
159 /**
160 * @brief  The reset value of the timeout register
161 */
162 #define SWT_IP_TO_RESET_VALUE_U32  (0x0073FDE0U)
163 /**
164 * @brief  The reset value of the window register
165 */
166 #define SWT_IP_WN_RESET_VALUE_U32  (0x00000000U)
167 /**
168 * @brief  The reset value of the service key register
169 */
170 #define SWT_IP_SK_RESET_VALUE_U16  (0x0000U)
171 /**
172 * @brief  Sets the master access protection field
173 */
174 #define SWT_IP_MAP_MASK_U32  (0xFF000000U)
175 #define SWT_IP_MAP_SHIFT  (24U)
176 
177 /*==================================================================================================
178 *                                              ENUMS
179 ==================================================================================================*/
180 
181 /*==================================================================================================
182 *                                  STRUCTURES AND OTHER TYPEDEFS
183 ==================================================================================================*/
184 
185 /*==================================================================================================
186 *                                  GLOBAL VARIABLE DECLARATIONS
187 ==================================================================================================*/
188 
189 /*==================================================================================================
190 *                                       FUNCTION PROTOTYPES
191 ==================================================================================================*/
192 
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 /** @} */
199 
200 #endif /* SWT_IP_CFG_DEFINES_H */
201 
202