1 /* 2 * Copyright 2020-2023 NXP 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef CLOCK_IP_SPECIFIC_H 8 #define CLOCK_IP_SPECIFIC_H 9 10 /** 11 * @file Clock_Ip_Specific.h 12 * @version 3.0.0 13 * 14 * @brief CLOCK IP specific header file. 15 * @details CLOCK IP specific header file. 16 17 * @addtogroup CLOCK_DRIVER Clock Ip Driver 18 * @{ 19 */ 20 21 #if defined(__cplusplus) 22 extern "C"{ 23 #endif 24 /*================================================================================================== 25 * INCLUDE FILES 26 * 1) system and project includes 27 * 2) needed interfaces from external units 28 * 3) internal and external interfaces from this unit 29 ==================================================================================================*/ 30 #include "Clock_Ip_Cfg_Defines.h" 31 #include "Mcal.h" 32 33 #if defined(CLOCK_IP_DERIVATIVE_001) 34 #include "Clock_Ip_Derivative_001.h" 35 #endif 36 #if defined(CLOCK_IP_DERIVATIVE_002) 37 #include "Clock_Ip_Derivative_002.h" 38 #endif 39 #if defined(CLOCK_IP_DERIVATIVE_003) 40 #include "Clock_Ip_Derivative_003.h" 41 #endif 42 #if defined(CLOCK_IP_DERIVATIVE_004) 43 #include "Clock_Ip_Derivative_004.h" 44 #endif 45 #if defined(CLOCK_IP_DERIVATIVE_005) 46 #include "Clock_Ip_Derivative_005.h" 47 #endif 48 #if defined(CLOCK_IP_DERIVATIVE_006) 49 #include "Clock_Ip_Derivative_006.h" 50 #endif 51 #if defined(CLOCK_IP_DERIVATIVE_007) 52 #include "Clock_Ip_Derivative_007.h" 53 #endif 54 #if defined(CLOCK_IP_DERIVATIVE_008) 55 #include "Clock_Ip_Derivative_008.h" 56 #endif 57 #if defined(CLOCK_IP_DERIVATIVE_009) 58 #include "Clock_Ip_Derivative_009.h" 59 #endif 60 61 62 63 /*================================================================================================== 64 SOURCE FILE VERSION INFORMATION 65 ==================================================================================================*/ 66 #define CLOCK_IP_SPECIFIC_VENDOR_ID 43 67 #define CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION 4 68 #define CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION 7 69 #define CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION 0 70 #define CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION 3 71 #define CLOCK_IP_SPECIFIC_SW_MINOR_VERSION 0 72 #define CLOCK_IP_SPECIFIC_SW_PATCH_VERSION 0 73 74 /*================================================================================================== 75 FILE VERSION CHECKS 76 ==================================================================================================*/ 77 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Cfg_Defines.h file have same versions */ 78 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_CFG_DEFINES_VENDOR_ID) 79 #error "Clock_Ip_Specific.h and Clock_Ip_Cfg_Defines.h have different vendor IDs" 80 #endif 81 82 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Cfg_Defines.h file are of the same Autosar version */ 83 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_CFG_DEFINES_AR_RELEASE_MAJOR_VERSION) || \ 84 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_CFG_DEFINES_AR_RELEASE_MINOR_VERSION) || \ 85 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_CFG_DEFINES_AR_RELEASE_REVISION_VERSION)) 86 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Cfg_Defines.h are different" 87 #endif 88 89 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Cfg_Defines.h file are of the same Software version */ 90 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_CFG_DEFINES_SW_MAJOR_VERSION) || \ 91 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_CFG_DEFINES_SW_MINOR_VERSION) || \ 92 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_CFG_DEFINES_SW_PATCH_VERSION)) 93 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Cfg_Defines.h are different" 94 #endif 95 96 #if defined(CLOCK_IP_DERIVATIVE_001) 97 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_001.h file have same versions */ 98 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_001_VENDOR_ID) 99 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_001.h have different vendor IDs" 100 #endif 101 102 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_001.h file are of the same Autosar version */ 103 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_001_AR_RELEASE_MAJOR_VERSION) || \ 104 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_001_AR_RELEASE_MINOR_VERSION) || \ 105 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_001_AR_RELEASE_REVISION_VERSION)) 106 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_001.h are different" 107 #endif 108 109 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_001.h file are of the same Software version */ 110 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_001_SW_MAJOR_VERSION) || \ 111 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_001_SW_MINOR_VERSION) || \ 112 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_001_SW_PATCH_VERSION)) 113 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_001.h are different" 114 #endif 115 #endif 116 117 #if defined(CLOCK_IP_DERIVATIVE_002) 118 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_002.h file have same versions */ 119 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_002_VENDOR_ID) 120 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_002.h have different vendor IDs" 121 #endif 122 123 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_002.h file are of the same Autosar version */ 124 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_002_AR_RELEASE_MAJOR_VERSION) || \ 125 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_002_AR_RELEASE_MINOR_VERSION) || \ 126 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_002_AR_RELEASE_REVISION_VERSION)) 127 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_002.h are different" 128 #endif 129 130 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_002.h file are of the same Software version */ 131 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_002_SW_MAJOR_VERSION) || \ 132 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_002_SW_MINOR_VERSION) || \ 133 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_002_SW_PATCH_VERSION)) 134 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_002.h are different" 135 #endif 136 #endif 137 138 #if defined(CLOCK_IP_DERIVATIVE_003) 139 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_003.h file have same versions */ 140 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_003_VENDOR_ID) 141 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_003.h have different vendor IDs" 142 #endif 143 144 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_003.h file are of the same Autosar version */ 145 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_003_AR_RELEASE_MAJOR_VERSION) || \ 146 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_003_AR_RELEASE_MINOR_VERSION) || \ 147 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_003_AR_RELEASE_REVISION_VERSION)) 148 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_003.h are different" 149 #endif 150 151 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_003.h file are of the same Software version */ 152 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_003_SW_MAJOR_VERSION) || \ 153 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_003_SW_MINOR_VERSION) || \ 154 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_003_SW_PATCH_VERSION)) 155 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_003.h are different" 156 #endif 157 #endif 158 159 #if defined(CLOCK_IP_DERIVATIVE_004) 160 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_004.h file have same versions */ 161 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_004_VENDOR_ID) 162 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_004.h have different vendor IDs" 163 #endif 164 165 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_004.h file are of the same Autosar version */ 166 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_004_AR_RELEASE_MAJOR_VERSION) || \ 167 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_004_AR_RELEASE_MINOR_VERSION) || \ 168 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_004_AR_RELEASE_REVISION_VERSION)) 169 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_004.h are different" 170 #endif 171 172 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_004.h file are of the same Software version */ 173 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_004_SW_MAJOR_VERSION) || \ 174 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_004_SW_MINOR_VERSION) || \ 175 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_004_SW_PATCH_VERSION)) 176 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_004.h are different" 177 #endif 178 #endif 179 180 #if defined(CLOCK_IP_DERIVATIVE_005) 181 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_005.h file have same versions */ 182 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_005_VENDOR_ID) 183 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_005.h have different vendor IDs" 184 #endif 185 186 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_005.h file are of the same Autosar version */ 187 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_005_AR_RELEASE_MAJOR_VERSION) || \ 188 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_005_AR_RELEASE_MINOR_VERSION) || \ 189 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_005_AR_RELEASE_REVISION_VERSION)) 190 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_005.h are different" 191 #endif 192 193 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_005.h file are of the same Software version */ 194 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_005_SW_MAJOR_VERSION) || \ 195 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_005_SW_MINOR_VERSION) || \ 196 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_005_SW_PATCH_VERSION)) 197 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_005.h are different" 198 #endif 199 #endif 200 201 #if defined(CLOCK_IP_DERIVATIVE_006) 202 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_006.h file have same versions */ 203 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_006_VENDOR_ID) 204 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_006.h have different vendor IDs" 205 #endif 206 207 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_006.h file are of the same Autosar version */ 208 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_006_AR_RELEASE_MAJOR_VERSION) || \ 209 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_006_AR_RELEASE_MINOR_VERSION) || \ 210 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_006_AR_RELEASE_REVISION_VERSION)) 211 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_006.h are different" 212 #endif 213 214 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_006.h file are of the same Software version */ 215 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_006_SW_MAJOR_VERSION) || \ 216 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_006_SW_MINOR_VERSION) || \ 217 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_006_SW_PATCH_VERSION)) 218 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_006.h are different" 219 #endif 220 #endif 221 222 #if defined(CLOCK_IP_DERIVATIVE_007) 223 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_007.h file have same versions */ 224 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_007_VENDOR_ID) 225 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_007.h have different vendor IDs" 226 #endif 227 228 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_007.h file are of the same Autosar version */ 229 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_007_AR_RELEASE_MAJOR_VERSION) || \ 230 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_007_AR_RELEASE_MINOR_VERSION) || \ 231 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_007_AR_RELEASE_REVISION_VERSION)) 232 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_007.h are different" 233 #endif 234 235 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_007.h file are of the same Software version */ 236 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_007_SW_MAJOR_VERSION) || \ 237 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_007_SW_MINOR_VERSION) || \ 238 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_007_SW_PATCH_VERSION)) 239 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_007.h are different" 240 #endif 241 #endif 242 243 #if defined(CLOCK_IP_DERIVATIVE_008) 244 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_008.h file have same versions */ 245 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_008_VENDOR_ID) 246 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_008.h have different vendor IDs" 247 #endif 248 249 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_008.h file are of the same Autosar version */ 250 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_008_AR_RELEASE_MAJOR_VERSION) || \ 251 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_008_AR_RELEASE_MINOR_VERSION) || \ 252 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_008_AR_RELEASE_REVISION_VERSION)) 253 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_008.h are different" 254 #endif 255 256 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_008.h file are of the same Software version */ 257 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_008_SW_MAJOR_VERSION) || \ 258 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_008_SW_MINOR_VERSION) || \ 259 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_008_SW_PATCH_VERSION)) 260 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_008.h are different" 261 #endif 262 #endif 263 264 #if defined(CLOCK_IP_DERIVATIVE_009) 265 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_009.h file have same versions */ 266 #if (CLOCK_IP_SPECIFIC_VENDOR_ID != CLOCK_IP_DERIVATIVE_009_VENDOR_ID) 267 #error "Clock_Ip_Specific.h and Clock_Ip_Derivative_009.h have different vendor IDs" 268 #endif 269 270 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_009.h file are of the same Autosar version */ 271 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_009_AR_RELEASE_MAJOR_VERSION) || \ 272 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != CLOCK_IP_DERIVATIVE_009_AR_RELEASE_MINOR_VERSION) || \ 273 (CLOCK_IP_SPECIFIC_AR_RELEASE_REVISION_VERSION != CLOCK_IP_DERIVATIVE_009_AR_RELEASE_REVISION_VERSION)) 274 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_009.h are different" 275 #endif 276 277 /* Check if Clock_Ip_Specific.h file and Clock_Ip_Derivative_009.h file are of the same Software version */ 278 #if ((CLOCK_IP_SPECIFIC_SW_MAJOR_VERSION != CLOCK_IP_DERIVATIVE_009_SW_MAJOR_VERSION) || \ 279 (CLOCK_IP_SPECIFIC_SW_MINOR_VERSION != CLOCK_IP_DERIVATIVE_009_SW_MINOR_VERSION) || \ 280 (CLOCK_IP_SPECIFIC_SW_PATCH_VERSION != CLOCK_IP_DERIVATIVE_009_SW_PATCH_VERSION)) 281 #error "Software Version Numbers of Clock_Ip_Specific.h and Clock_Ip_Derivative_009.h are different" 282 #endif 283 #endif 284 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK 285 /* Check if Clock_Ip_Specific.h file and Mcal.h file are of the same Autosar version */ 286 #if ((CLOCK_IP_SPECIFIC_AR_RELEASE_MAJOR_VERSION != MCAL_AR_RELEASE_MAJOR_VERSION) || \ 287 (CLOCK_IP_SPECIFIC_AR_RELEASE_MINOR_VERSION != MCAL_AR_RELEASE_MINOR_VERSION)) 288 #error "AutoSar Version Numbers of Clock_Ip_Specific.h and Mcal.h are different" 289 #endif 290 #endif 291 /*================================================================================================== 292 * CONSTANTS 293 ==================================================================================================*/ 294 295 /*================================================================================================== 296 * DEFINES AND MACROS 297 ==================================================================================================*/ 298 299 #define CLOCK_IP_ALL_CALLBACKS_COUNT 9U 300 #define CLOCK_IP_TRIGGER_VALUE 0xFFFFFFFFU /* Trigger value. */ 301 302 #define CLOCK_IP_NUMBER_OF_HARDWARE_DFS 0U 303 #if defined(CLOCK_IP_HAS_PLLAUX_CLK) 304 #define CLOCK_IP_NUMBER_OF_HARDWARE_PLL 2U 305 #else 306 #define CLOCK_IP_NUMBER_OF_HARDWARE_PLL 1U 307 #endif 308 #define CLOCK_IP_MC_CGM_INSTANCES_COUNT 1U 309 #define CLOCK_IP_MC_CGM_MUXS_COUNT 20U 310 #define CLOCK_IP_XOSC_INSTANCES_ARRAY_SIZE 2U 311 #define CLOCK_IP_PLL_INSTANCES_ARRAY_SIZE 2U 312 #define CLOCK_IP_MC_ME_PARTITIONS_COUNT 4U 313 #define CLOCK_IP_CMU_INFO_SIZE 7U 314 #define CLOCK_IP_GATE_INFO_SIZE 219U 315 #define CLOCK_IP_EXTENSIONS_SIZE 34U 316 #define CLOCK_IP_MC_CGM_MUX_MUX_DIV_COUNT 7u 317 #define CLOCK_IP_MC_CGM_PCFS_COUNT 8u 318 #define CLOCK_IP_PRTN_COFB_NO 4u 319 320 #define MC_CGM_MUX_DC_DE_MASK MC_CGM_MUX_0_DC_0_DE_MASK 321 #define MC_CGM_MUX_DC_DE_SHIFT MC_CGM_MUX_0_DC_0_DE_SHIFT 322 #define MC_CGM_MUX_CSC_SAFE_SW_MASK MC_CGM_MUX_0_CSS_SAFE_SW_MASK 323 #define MC_CGM_MUX_CSC_CLK_SW_MASK MC_CGM_MUX_0_CSC_CLK_SW_MASK 324 #define MC_CGM_MUX_CSC_RAMPUP_MASK MC_CGM_MUX_0_CSC_RAMPUP_MASK 325 #define MC_CGM_MUX_CSC_RAMPDOWN_MASK MC_CGM_MUX_0_CSC_RAMPDOWN_MASK 326 #define MC_CGM_MUX_CSS_SWIP_MASK MC_CGM_MUX_0_CSS_SWIP_MASK 327 #define MC_CGM_MUX_CSS_SWIP_IN_PROGRESS MC_CGM_MUX_CSS_SWIP_MASK 328 #define MC_CGM_MUX_CSS_SWTRG_MASK MC_CGM_MUX_0_CSS_SWTRG_MASK 329 #define MC_CGM_MUX_CSS_SWTRG_SHIFT MC_CGM_MUX_0_CSS_SWTRG_SHIFT 330 #define CLOCK_IP_MC_CGM_MUX_CSS_SWTRG_SUCCEEDED 1U 331 #define MC_CGM_MUX_CSS_CLK_SW_MASK MC_CGM_MUX_0_CSS_CLK_SW_MASK 332 #define CLOCK_IP_MC_CGM_MUX_CSS_CLK_SW_NOT_REQUESTED 0U 333 #define MC_CGM_MUX_CSC_CG_MASK MC_CGM_MUX_5_CSC_CG_MASK 334 #define MC_CGM_MUX_CSC_FCG_MASK MC_CGM_MUX_5_CSC_FCG_MASK 335 #define MC_CGM_MUX_CSS_CS_MASK MC_CGM_MUX_5_CSS_CS_MASK 336 #define MC_CGM_MUX_CSS_CS_TRANSPARENT MC_CGM_MUX_CSS_CS_MASK 337 #define MC_CGM_MUX_DIV_UPD_STAT_DIV_STAT_MASK MC_CGM_MUX_0_DIV_UPD_STAT_DIV_STAT_MASK 338 #define MC_CGM_MUX_DIV_UPD_STAT_DIV_STAT_PENDING MC_CGM_MUX_DIV_UPD_STAT_DIV_STAT_MASK 339 #define MC_CGM_MUX_DIV_TRIG_CTRL_TCTL_MASK MC_CGM_MUX_0_DIV_TRIG_CTRL_TCTL_MASK 340 #define MC_CGM_MUX_DIV_TRIG_TRIGGER(x) MC_CGM_MUX_0_DIV_TRIG_CTRL_TCTL(x) 341 #define MC_CGM_MUX_DIV_TRIG_CTRL_COMMON_TRIGGER_DIVIDER_UPDATE MC_CGM_MUX_DIV_TRIG_CTRL_TCTL_MASK 342 343 #define MC_CGM_PCFS_DIVC_INIT(x) MC_CGM_PCFS_DIVC8_INIT(x) 344 #define MC_CGM_PCFS_DIVC_RATE(x) MC_CGM_PCFS_DIVC8_RATE(x) 345 #define MC_CGM_PCFS_DIVE_DIVE(x) MC_CGM_PCFS_DIVE8_DIVE(x) 346 #define MC_CGM_PCFS_DIVS_DIVS(x) MC_CGM_PCFS_DIVS8_DIVS(x) 347 348 #define CLOCK_IP_CMU_FREQUENCY_CHECK_ENABLED CMU_FC_GCR_FCE_MASK 349 #define CLOCK_IP_CMU_FREQUENCY_CHECK_STOPPED 0U 350 #define CLOCK_IP_CMU_ISR_MASK 3U 351 352 #define CLOCK_IP_CMU_INSTANCES_ARRAY_SIZE 7U 353 /*================================================================================================== 354 * ENUMS 355 ==================================================================================================*/ 356 357 /*================================================================================================== 358 * STRUCTURES AND OTHER TYPEDEFS 359 ==================================================================================================*/ 360 361 typedef struct { 362 uint32 CSC; 363 const uint32 CSS; 364 uint32 Divider[CLOCK_IP_MC_CGM_MUX_MUX_DIV_COUNT]; 365 uint8 RESERVED_0[16]; 366 uint32 MUX_DIV_TRIG_CTRL; /**< Clock Mux 0 Divider Trigger Control Register, offset: 0x334 */ 367 uint32 MUX_DIV_TRIG; /**< Clock Mux 0 Divider Trigger Register, offset: 0x338 */ 368 const uint32 MUX_DIV_UPD_STAT; 369 370 }volatile Clock_Ip_CgmMuxType; 371 372 typedef struct { 373 374 uint32 PCFS_SDUR; /**< PCFS Step Duration, offset: 0x0 */ 375 struct { /* offset: 0x4, array step: 0xC */ 376 uint32 DIVC; /**< PCFS Divider Change Register, array offset: 0x4, array step: 0xC */ 377 uint32 DIVE; /**< PCFS Divider End Register, array offset: 0x8, array step: 0xC */ 378 uint32 DIVS; /**< PCFS Divider Start Register, array offset: 0xC, array step: 0xC */ 379 } PCFS[CLOCK_IP_MC_CGM_PCFS_COUNT]; 380 381 }Clock_Ip_CgmPcfsType; 382 383 typedef struct { 384 volatile uint32 PRTN_COFB_CLKEN[CLOCK_IP_PRTN_COFB_NO]; 385 }Clock_Ip_McmePartitionSetType; 386 387 typedef struct { 388 volatile const uint32 PRTN_COFB_STAT[CLOCK_IP_PRTN_COFB_NO]; 389 }Clock_Ip_McmePartitionGetType; 390 391 typedef struct { 392 volatile uint32 PRTN_PCONF; 393 volatile uint32 PRTN_PUPD; 394 volatile const uint32 PRTN_STAT; 395 }Clock_Ip_McmePartitionTriggerType; 396 397 /** XOSC - Register Layout Typedef */ 398 typedef struct { 399 uint32 CTRL; /**< XOSC Control Register, offset: 0x0 */ 400 const uint32 STAT; /**< Oscillator Status Register, offset: 0x4 */ 401 }volatile Clock_Ip_ExtOSCType; 402 403 /** CMU - Register Layout Typedef */ 404 typedef struct { 405 uint32 GCR; /**< Global Configuration Register, offset: 0x0 */ 406 uint32 RCCR; /**< Reference Count Configuration Register, offset: 0x4 */ 407 uint32 HTCR; /**< High Threshold Configuration Register, offset: 0x8 */ 408 uint32 LTCR; /**< Low Threshold Configuration Register, offset: 0xC */ 409 volatile uint32 SR; /**< Status Register, offset: 0x10 */ 410 uint32 IER; /**< Interrupt Enable Register, offset: 0x14 */ 411 412 }Clock_Ip_ClockMonitorType; 413 414 typedef struct{ 415 416 Clock_Ip_NameType Name; /* Name of the clock that can be monitored/supports cmu (clock monitor) */ 417 Clock_Ip_NameType Reference; /* Name of the reference clock */ 418 Clock_Ip_NameType Bus; /* Name of the bus clock */ 419 420 Clock_Ip_ClockMonitorType* CmuInstance; 421 422 }Clock_Ip_CmuInfoType; 423 typedef struct 424 { 425 uint8 PartitionValue; 426 uint8 ColectionValue; 427 uint8 RequestValueShift; 428 uint32 RequestValueMask; 429 430 }Clock_Ip_GateInfoType; 431 432 typedef struct 433 { 434 uint32 SelectorValueMask; 435 uint32 SelectorValueShift; 436 uint32 DividerValueMask; 437 uint32 DividerValueShift; 438 439 }Clock_Ip_ClockExtensionType; 440 441 typedef struct 442 { 443 PLL_Type* PllInstance; 444 uint8 DivsNo; 445 446 }Clock_Ip_PllType; 447 448 /*================================================================================================== 449 * GLOBAL VARIABLE DECLARATIONS 450 ==================================================================================================*/ 451 /* Clock start constant section data */ 452 #define MCU_START_SEC_CONST_UNSPECIFIED 453 #include "Mcu_MemMap.h" 454 455 extern Clock_Ip_CgmMuxType* const Clock_Ip_apxCgm[CLOCK_IP_MC_CGM_INSTANCES_COUNT][CLOCK_IP_MC_CGM_MUXS_COUNT]; 456 extern volatile Clock_Ip_CgmPcfsType* const Clock_Ip_apxCgmPcfs[CLOCK_IP_MC_CGM_INSTANCES_COUNT]; 457 extern Clock_Ip_ExtOSCType* const Clock_Ip_apxXosc[CLOCK_IP_XOSC_INSTANCES_ARRAY_SIZE]; 458 extern Clock_Ip_PllType const Clock_Ip_apxPll[CLOCK_IP_PLL_INSTANCES_ARRAY_SIZE]; 459 extern Clock_Ip_ClockMonitorType * const Clock_Ip_apxCmu[CLOCK_IP_CMU_INSTANCES_ARRAY_SIZE]; 460 extern Clock_Ip_NameType const Clock_Ip_aeCmuNames[CLOCK_IP_CMU_INSTANCES_ARRAY_SIZE]; 461 extern volatile Clock_Ip_McmePartitionSetType* const Clock_Ip_apxMcMeSetPartitions[CLOCK_IP_MC_ME_PARTITIONS_COUNT]; 462 extern volatile const Clock_Ip_McmePartitionGetType* const Clock_Ip_apxMcMeGetPartitions[CLOCK_IP_MC_ME_PARTITIONS_COUNT]; 463 extern volatile Clock_Ip_McmePartitionTriggerType* const Clock_Ip_apxMcMeTriggerPartitions[CLOCK_IP_MC_ME_PARTITIONS_COUNT]; 464 465 extern const Clock_Ip_CmuInfoType Clock_Ip_axCmuInfo[CLOCK_IP_CMU_INFO_SIZE]; 466 467 extern const Clock_Ip_GateInfoType Clock_Ip_axGateInfo[CLOCK_IP_GATE_INFO_SIZE]; 468 469 extern const Clock_Ip_ClockExtensionType Clock_Ip_axFeatureExtensions[CLOCK_IP_EXTENSIONS_SIZE]; 470 471 /* Clock stop constant section data */ 472 #define MCU_STOP_SEC_CONST_UNSPECIFIED 473 #include "Mcu_MemMap.h" 474 475 /* Clock start constant section data */ 476 #define MCU_START_SEC_CONST_8 477 #include "Mcu_MemMap.h" 478 479 extern const uint8 Clock_Ip_au8SoftwareMuxResetValue[CLOCK_IP_FEATURE_NAMES_NO]; 480 481 /* Clock stop constant section data */ 482 #define MCU_STOP_SEC_CONST_8 483 #include "Mcu_MemMap.h" 484 485 486 /* Clock start constant section data */ 487 #define MCU_START_SEC_CONST_16 488 #include "Mcu_MemMap.h" 489 490 extern const uint16 Clock_Ip_au16SelectorEntryHardwareValue[CLOCK_IP_FEATURE_PRODUCERS_NO]; 491 extern const uint16 Clock_Ip_au16SelectorEntryRtcHardwareValue[CLOCK_IP_FEATURE_PRODUCERS_NO]; 492 493 /* Clock stop constant section data */ 494 #define MCU_STOP_SEC_CONST_16 495 #include "Mcu_MemMap.h" 496 497 498 /*================================================================================================== 499 * FUNCTION PROTOTYPES 500 ==================================================================================================*/ 501 502 /* Clock start section code */ 503 #define MCU_START_SEC_CODE 504 505 #include "Mcu_MemMap.h" 506 void DisableFircInStandbyMode(void); 507 void EnableFircInStandbyMode(void); 508 void DisableSircInStandbyMode(void); 509 void EnableSircInStandbyMode(void); 510 #if (defined(CLOCK_IP_ENABLE_USER_MODE_SUPPORT)) 511 #if (STD_ON == CLOCK_IP_ENABLE_USER_MODE_SUPPORT) 512 void Clock_Ip_SpecificSetUserAccessAllowed(void); 513 #endif 514 #endif /* CLOCK_IP_ENABLE_USER_MODE_SUPPORT */ 515 void Clock_Ip_McMeEnterKey(void); 516 517 /* Clock stop section code */ 518 #define MCU_STOP_SEC_CODE 519 520 #include "Mcu_MemMap.h" 521 522 #if defined(__cplusplus) 523 } 524 #endif /* __cplusplus*/ 525 526 527 /*! @}*/ 528 529 #endif /* CLOCK_IP_SPECIFIC_H */ 530 531