1 /*
2  * Copyright 2023 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /**
8 *   @file       Clock_Ip_Cfg.h
9 *   @version    3.0.0
10 *
11 *   @brief   AUTOSAR Mcu - Clock configuration header file.
12 *   @details This file is the header containing all the necessary information for CLOCK
13 *            module configuration(s).
14 *
15 *   @addtogroup CLOCK_DRIVER_CONFIGURATION Clock Driver
16 *   @{
17 */
18 
19 #ifndef CLOCK_IP_CFG_H
20 #define CLOCK_IP_CFG_H
21 
22 
23 #ifdef __cplusplus
24 extern "C"{
25 #endif
26 
27 
28 /*==================================================================================================
29                                          INCLUDE FILES
30  1) system and project includes
31  2) needed interfaces from external units
32  3) internal and external interfaces from this unit
33 ==================================================================================================*/
34 
35 #include "Clock_Ip_Types.h"
36 
37 /*==================================================================================================
38 *                              SOURCE FILE VERSION INFORMATION
39 ==================================================================================================*/
40 #define CLOCK_IP_CFG_VENDOR_ID                      43
41 #define CLOCK_IP_CFG_AR_RELEASE_MAJOR_VERSION       4
42 #define CLOCK_IP_CFG_AR_RELEASE_MINOR_VERSION       7
43 #define CLOCK_IP_CFG_AR_RELEASE_REVISION_VERSION    0
44 #define CLOCK_IP_CFG_SW_MAJOR_VERSION               3
45 #define CLOCK_IP_CFG_SW_MINOR_VERSION               0
46 #define CLOCK_IP_CFG_SW_PATCH_VERSION               0
47 
48 /*==================================================================================================
49 *                                     FILE VERSION CHECKS
50 ==================================================================================================*/
51 #ifndef DISABLE_MCAL_INTERMODULE_ASR_CHECK
52 /* Check if header file and Clock_Ip_Types.h file are of the same vendor */
53 #if (CLOCK_IP_CFG_VENDOR_ID != CLOCK_IP_TYPES_VENDOR_ID)
54     #error "Clock_Ip_Cfg.h and Clock_Ip_Types.h have different vendor ids"
55 #endif
56 
57 /* Check if header file and Clock_Ip_Types.h file are of the same Autosar version */
58 #if ((CLOCK_IP_CFG_AR_RELEASE_MAJOR_VERSION != CLOCK_IP_TYPES_AR_RELEASE_MAJOR_VERSION) || \
59      (CLOCK_IP_CFG_AR_RELEASE_MINOR_VERSION != CLOCK_IP_TYPES_AR_RELEASE_MINOR_VERSION) || \
60      (CLOCK_IP_CFG_AR_RELEASE_REVISION_VERSION != CLOCK_IP_TYPES_AR_RELEASE_REVISION_VERSION) \
61     )
62     #error "AutoSar Version Numbers of Clock_Ip_Cfg.h and Clock_Ip_Types.h are different"
63 #endif
64 
65 /* Check if header file and Clock_Ip_Types.h file are of the same Software version */
66 #if ((CLOCK_IP_CFG_SW_MAJOR_VERSION != CLOCK_IP_TYPES_SW_MAJOR_VERSION) || \
67      (CLOCK_IP_CFG_SW_MINOR_VERSION != CLOCK_IP_TYPES_SW_MINOR_VERSION) || \
68      (CLOCK_IP_CFG_SW_PATCH_VERSION != CLOCK_IP_TYPES_SW_PATCH_VERSION) \
69     )
70     #error "Software Version Numbers of Clock_Ip_Cfg.h and Clock_Ip_Types.h are different"
71 #endif
72 
73 #endif    /* DISABLE_MCAL_INTERMODULE_ASR_CHECK */
74 
75 /*==================================================================================================
76                                            DEFINES AND MACROS
77 ==================================================================================================*/
78 /**
79 * @brief            Pre-processor switch for enabling the default error detection and reporting to the DET.
80 *                   The detection of default errors is configurable (ON / OFF) at pre-compile time.
81 */
82 #define CLOCK_IP_DEV_ERROR_DETECT         (STD_OFF)
83 
84 #define CLOCK_IP_TIMEOUT_TYPE                (OSIF_COUNTER_DUMMY)
85 
86 #define CLOCK_IP_TIMEOUT_VALUE_US            (50000)
87 
88 /**
89 * @brief        Support for User mode.
90 *               If this parameter has been configured to 'TRUE' the Clock can be executed from both supervisor and user mode.
91 */
92 #define CLOCK_IP_ENABLE_USER_MODE_SUPPORT  (STD_OFF)
93 
94 /** Check the driver user mode is enabled only when the MCAL_ENABLE_USER_MODE_SUPPORT is enabled */
95 #ifndef MCAL_ENABLE_USER_MODE_SUPPORT
96   #if (STD_ON == CLOCK_IP_ENABLE_USER_MODE_SUPPORT)
97     #error MCAL_ENABLE_USER_MODE_SUPPORT is not enabled. For running Clock in user mode the MCAL_ENABLE_USER_MODE_SUPPORT needs to be defined.
98   #endif /* (STD_ON == CLOCK_IP_ENABLE_USER_MODE_SUPPORT) */
99 #endif /* ifndef MCAL_ENABLE_USER_MODE_SUPPORT */
100 
101 /*==================================================================================================
102                                              ENUMS
103 ==================================================================================================*/
104 
105 #ifdef CLOCK_IP_PREPARE_MEMORY_CONFIG
106 /**
107 * @brief            The stage of the flash and ram controllers configuration.
108 * @details          This is used to specify the entry and exit point of the flash and ram controllers configuration.
109 */
110 typedef enum
111 {
112     CLOCK_IP_RAM_MEMORY_CONFIG_ENTRY_POINT      = 0x77U,
113     CLOCK_IP_RAM_MEMORY_CONFIG_EXIT_POINT       = 0x88U,
114     CLOCK_IP_FLASH_MEMORY_CONFIG_ENTRY_POINT    = 0x89U,
115     CLOCK_IP_FLASH_MEMORY_CONFIG_EXIT_POINT     = 0x90U
116 
117 } Clock_Ip_MemoryConfigStageType;
118 #endif
119 
120 
121 /*==================================================================================================
122                                  STRUCTURES AND OTHER TYPEDEFS
123 ==================================================================================================*/
124 
125 /*==================================================================================================
126 *                                    FUNCTION PROTOTYPES
127 ==================================================================================================*/
128 #define MCU_START_SEC_CODE
129 #include "Mcu_MemMap.h"
130 
131 #define MCU_STOP_SEC_CODE
132 #include "Mcu_MemMap.h"
133 
134 
135 #define MCU_START_SEC_CONFIG_DATA_UNSPECIFIED
136 #include "Mcu_MemMap.h"
137 
138 
139 /* *************************************************************************
140  * Configuration structure for Clock Configuration
141  * ************************************************************************* */
142 
143 extern const Clock_Ip_ClockConfigType Clock_Ip_aClockConfig[];
144 
145 
146 #define MCU_STOP_SEC_CONFIG_DATA_UNSPECIFIED
147 #include "Mcu_MemMap.h"
148 
149 #ifdef __cplusplus
150 }
151 #endif
152 
153 #endif /* CLOCK_IP_CFG_H */
154 
155 /** @} */
156