MCUSW
Mcu_Cfg.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (C) 2023 Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 
63  /****************************************************************************
64  Project: Mcu_j7
65  Date : 2023-06-18 16:51:07
66 
67  This file is generated by EB Tresos
68  Do not modify this file,otherwise the software may behave in unexpected way.
69 
70  ******************************************************************************/
71 
87 #ifndef MCU_CFG_H
88 #define MCU_CFG_H
89 
90 /*********************************************************************************************************************
91  * Standard Header Files
92  *********************************************************************************************************************/
93 
94 /*********************************************************************************************************************
95  * Other Header Files
96  *********************************************************************************************************************/
97 
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101 
107 #define MCU_VARIANT_POST_BUILD (STD_ON)
108 
109 /**********************************************************************************************************************
110  * Version Check
111  *********************************************************************************************************************/
113 #define MCU_CFG_ID (0x1U)
114 
115 
116 
117 /* Requirements: SWS_Mcu_00129 */
125 #define MCU_CFG_MAJOR_VERSION (9U)
126 
127 #define MCU_CFG_MINOR_VERSION (0U)
128 
129 #define MCU_CFG_PATCH_VERSION (0U)
130 /* @} */
131 
132 /*********************************************************************************************************************
133  * Exported enums
134  *********************************************************************************************************************/
135 
136 
137 /*********************************************************************************************************************
138  * Exported Preprocessor #define Constants
139  *********************************************************************************************************************/
141 #define MCU_DEV_ERROR_DETECT (STD_ON)
142 
143 #define MCU_GET_RAM_STATE_API (STD_OFF)
144 
145 #define MCU_INIT_CLOCK_API (STD_ON)
146 
147 #define MCU_PERFORM_RESET_API (STD_ON)
148 
149 #define MCU_GET_VERSION_INFO_API (STD_ON)
150 
151 #define MCU_INIT_RAM_API (STD_OFF)
152 
153 #define MCU_NO_PLL (STD_OFF)
154 
155 #define MCU_REGISTER_READBACK_API (STD_OFF)
156 
157 
164 #define DemConf_DemEventParameter_MCU_DEM_NO_EVENT (0xFFFFU)
165 #define MCU_DEM_NO_EVENT DemConf_DemEventParameter_MCU_DEM_NO_EVENT
166 
167 /* @} */
168 
169 #ifndef MCU_E_CLOCK_FAILURE
170 
171 #define MCU_E_CLOCK_FAILURE (MCU_DEM_NO_EVENT)
172 #endif
173 
175 #define MCU_PERFORM_RESET_MASK ((uint32) 0x00060000U)
176 #define MCU_PERFORM_RESET_CLEAR_MASK ((uint32) 0xFFFFFFFFU)
177 #define MCU_RST_SRC_STAT_CLEAR ((uint32) 0x190B0BU)
178 #define SW_MCU_WARM_RST ((uint32) 0x1U)
179 #define SW_MAIN_WARM_RST ((uint32) 0x2U)
180 #define SW_MAIN_POR ((uint32) 0x8U)
181 #define MCU_RESETZ ((uint32) 0x100U)
182 #define WARM_OUT_RST ((uint32) 0x10000U)
183 #define COLD_OUT_RST ((uint32) 0x80000U)
184 #define DEBUG_RST_OCCURED ((uint32) 0x100000U)
185 
186 #define rstaddr ((LLD_wkup_ctrl_mmr_cfg0Regs*)0x43000000U)
187 
189 #define MCU_ERRORRST_MASK ((Mcu_RawResetType)0xFFFF0000U)
190 
191 #define MCU_UTILS_ARRAYSIZE(array) ((sizeof (array) / \
192  sizeof ((array)[0])))
193 
194 #define MCU_RESET_STATUS_NUMBER ((uint8)0x6)
195 
196 #define ARRAYSIZE(array) ((sizeof (array) / \
197  sizeof ((array)[0])))
198 
199 
205 /*
206  * The following defines shall be used as input
207  * parameter for: Mcu_SetMode(),
208  * Mcu_InitClock()
209  * Mcu_InitRamSection()
210  */
211 
212 /*<MCU_CFG_MODEUSERCONFIG_LIST>*/
213 
214 #define McuConf_McuModeSettingConf_McuModeSettingConf_0 (0U)
215 /*</MCU_CFG_MODEUSERCONFIG_LIST>*/
216 
217 /*<MCU_CFG_CLOCKUSERCONFIG_LIST>*/
218 /*
219 * Clock configuration
220 */
221 /* The nomenclature is as per AUTOSAR_TPS_ECUConfiguration.pdf
222 */
223 #define McuConf_McuClockSettingConfig_MCU_MCAN0 (0U)
224 #define McuConf_McuClockSettingConfig_MCU_MCAN1 (1U)
225 #define McuConf_McuClockSettingConfig_MAIN_RTI_0 (2U)
226 
227 /*</MCU_CFG_CLOCKUSERCONFIG_LIST>*/
228 
229 
230 /*********************************************************************************************************************
231  * Exported Preprocessor #define Macros
232  *********************************************************************************************************************/
233 
234 /*********************************************************************************************************************
235  * Exported Type Declarations
236  *********************************************************************************************************************/
237 
238 /* Requirements: SWS_Mcu_00252,SWS_Mcu_00234 */
245 typedef enum
246 {
247  /* Requirements: SWS_Mcu_00134 */
255 } Mcu_ResetType;
256 
257 
258 
259 typedef enum
260 {
268 
269 
270 typedef enum
271 {
293 
301 typedef enum
302 {
397 
402 typedef enum
403 {
413 
414 /* Requirements: SWS_Mcu_00250,SWS_Mcu_00231 */
420 typedef enum
421 {
426 
430 typedef struct
431 {
432  uint16 N;
433  uint16 M2;
434  uint16 FracM;
435  uint16 sdDiv;
442 
446 typedef struct
447 {
452 
453 /* Requirements : SWS_Mcu_00256 */
458 typedef enum
459 {
463 
464 
465 /* Requirements: SWS_Mcu_00030 */
469 typedef struct
470 {
471  P2VAR(uint8, AUTOMATIC, MCU_RAM_COPY) Mcu_RamSectionBaseAddress;
478 
482 typedef P2CONST (Mcu_RamSectionConfigType, AUTOMATIC, MCU_CONFIG_DATA)
484 
488 typedef enum
489 {
493 
497 typedef P2CONST (Mcu_PllConfigType, AUTOMATIC, MCU_CONFIG_DATA)
499 
503 typedef P2FUNC (Std_ReturnType, AUTOMATIC, Mcu_CBKFunctionPtrType)
504  (uint32 moduleId, uint32 clkId, uint64 ParentId);
505 
506 typedef struct
507 {
508  uint32 rawresetval;
511 
512 
513 typedef struct
514 {
515  uint8 numFields;
517 } Mcu_ResetInfo;
518 
519 extern CONST(Mcu_ResetStatusMap,
521 
522 extern CONST(Mcu_ResetInfo, MCU_CONST) Mcu_ResetInfoTbl ;
523 
525 extern const struct Mcu_ConfigType_s McuModuleConfiguration_0;
526 
527 #ifdef __cplusplus
528 }
529 #endif
530 
531 #endif /* #ifndef MCU_CFG_H */
532 
533 /* @} */
534 
535 /**********************************************************************************************************************
536  * End of File: Mcu_Cfg.h
537  *********************************************************************************************************************/
538 
539 
Mcu_ClkSourceIdType
This is the type of the clock source in clock tree that is selectable for peripheral....
Definition: Mcu_Cfg.h:402
Definition: Mcu_Cfg.h:312
const Mcu_ResetInfo Mcu_ResetInfoTbl
Mcu_ClkModuleIdType
Clock source config modules id enum.
Definition: Mcu_Cfg.h:301
Definition: Mcu_Cfg.h:307
Definition: Mcu_Cfg.h:461
Definition: Mcu_Cfg.h:309
Definition: Mcu_Cfg.h:357
Mcu_ResetType
This is the type of the reset enumerator containing the subset of reset types. It is not required t...
Definition: Mcu_Cfg.h:245
Definition: Mcu_Cfg.h:506
Definition: Mcu_Cfg.h:349
Definition: Mcu_Cfg.h:335
Definition: Mcu_Cfg.h:391
Mcu_ModuleName
Definition: Mcu_Cfg.h:270
Mcu_PllClkDivType Mcu_PllClk1
Definition: Mcu_Cfg.h:448
Definition: Mcu_Cfg.h:265
Definition: Mcu_Cfg.h:250
Definition: Mcu_Cfg.h:263
Definition: Mcu_Cfg.h:288
Definition: Mcu_Cfg.h:364
Std_ReturnType(* Mcu_CBKFunctionPtrType)(uint32 moduleId, uint32 clkId, uint64 ParentId)
Pointer to Callback function.
Definition: Mcu_Cfg.h:504
Definition: Mcu_Cfg.h:371
Definition: Mcu_Cfg.h:346
MCU PLL CONFIG structure.
Definition: Mcu_Cfg.h:446
Definition: Mcu_Cfg.h:276
uint8 Mcu_RamDefaultValue
Definition: Mcu_Cfg.h:473
Definition: Mcu_Cfg.h:343
Definition: Mcu_Cfg.h:410
Definition: Mcu_Cfg.h:393
Definition: Mcu_Cfg.h:377
uint16 sdDiv
Definition: Mcu_Cfg.h:435
Definition: Mcu_Cfg.h:388
Definition: Mcu_Cfg.h:359
Definition: Mcu_Cfg.h:345
Definition: Mcu_Cfg.h:329
Definition: Mcu_Cfg.h:311
Mcu_RamStateType
Enumeration of ranstate queried by Mcu_GetRamState()
Definition: Mcu_Cfg.h:458
Definition: Mcu_Cfg.h:389
uint64 MCU_PLL_HSDIV3
Definition: Mcu_Cfg.h:440
Definition: Mcu_Cfg.h:341
uint64 MCU_PLL_HSDIV1
Definition: Mcu_Cfg.h:438
const Mcu_ResetStatusMap Mcu_ResetStatusMapTbl[MCU_RESET_STATUS_NUMBER]
Definition: Mcu_Cfg.h:340
Definition: Mcu_Cfg.h:376
Definition: Mcu_Cfg.h:404
Definition: Mcu_Cfg.h:380
Mcu_PllClkDivType Mcu_PllClk3
Definition: Mcu_Cfg.h:450
Definition: Mcu_Cfg.h:286
Definition: Mcu_Cfg.h:313
Definition: Mcu_Cfg.h:409
Definition: Mcu_Cfg.h:344
Mcu_DomainType
Definition: Mcu_Cfg.h:259
Definition: Mcu_Cfg.h:383
Definition: Mcu_Cfg.h:382
Definition: Mcu_Cfg.h:358
uint16 M2
Definition: Mcu_Cfg.h:433
Definition: Mcu_Cfg.h:363
Definition: Mcu_Cfg.h:362
Definition: Mcu_Cfg.h:261
Definition: Mcu_Cfg.h:423
Mcu_PllSourceIdType
Type for PLL source selection.
Definition: Mcu_Cfg.h:488
const Mcu_ResetStatusMap * resetMap
Definition: Mcu_Cfg.h:516
Definition: Mcu_Cfg.h:460
Definition: Mcu_Cfg.h:330
Definition: Mcu_Cfg.h:339
Definition: Mcu_Cfg.h:338
Definition: Mcu_Cfg.h:318
Definition: Mcu_Cfg.h:513
Definition: Mcu_Cfg.h:369
uint32 rawresetval
Definition: Mcu_Cfg.h:508
Mcu_ResetType resetReason
Definition: Mcu_Cfg.h:509
uint32 Mcu_RamSectionBytes
Definition: Mcu_Cfg.h:475
uint8 numFields
Definition: Mcu_Cfg.h:515
Definition: Mcu_Cfg.h:350
Definition: Mcu_Cfg.h:390
Definition: Mcu_Cfg.h:337
uint64 MCU_PLL_HSDIV0
Definition: Mcu_Cfg.h:437
Definition: Mcu_Cfg.h:252
Definition: Mcu_Cfg.h:322
Definition: Mcu_Cfg.h:317
Definition: Mcu_Cfg.h:274
Definition: Mcu_Cfg.h:326
Structure for enumerating the clock outputs of HSDIVIDER.
Definition: Mcu_Cfg.h:430
Definition: Mcu_Cfg.h:342
Definition: Mcu_Cfg.h:253
Definition: Mcu_Cfg.h:254
Definition: Mcu_Cfg.h:406
Definition: Mcu_Cfg.h:367
Definition: Mcu_Cfg.h:251
Definition: Mcu_Cfg.h:323
Definition: Mcu_Cfg.h:374
Definition: Mcu_Cfg.h:303
Definition: Mcu_Cfg.h:351
Definition: Mcu_Cfg.h:314
const struct Mcu_ConfigType_s McuModuleConfiguration_0
MCU Configuration struct declaration.
Definition: Mcu_Cfg.h:395
Definition: Mcu_Cfg.h:332
Definition: Mcu_Cfg.h:366
Definition: Mcu_Cfg.h:305
uint16 N
Definition: Mcu_Cfg.h:432
Definition: Mcu_Cfg.h:348
Definition: Mcu_Cfg.h:361
Definition: Mcu_Cfg.h:491
Definition: Mcu_Cfg.h:327
Definition: Mcu_Cfg.h:248
Definition: Mcu_Cfg.h:308
Definition: Mcu_Cfg.h:316
Definition: Mcu_Cfg.h:365
Definition: Mcu_Cfg.h:392
Definition: Mcu_Cfg.h:282
Definition: Mcu_Cfg.h:319
Definition: Mcu_Cfg.h:310
Definition: Mcu_Cfg.h:375
Definition: Mcu_Cfg.h:387
Definition: Mcu_Cfg.h:354
Definition: Mcu_Cfg.h:333
Definition: Mcu_Cfg.h:321
Definition: Mcu_Cfg.h:336
Definition: Mcu_Cfg.h:284
Definition: Mcu_Cfg.h:381
Definition: Mcu_Cfg.h:373
Definition: Mcu_Cfg.h:249
Definition: Mcu_Cfg.h:355
Definition: Mcu_Cfg.h:280
Definition: Mcu_Cfg.h:372
Definition: Mcu_Cfg.h:320
Definition: Mcu_Cfg.h:368
uint8 * Mcu_RamSectionBaseAddress
Definition: Mcu_Cfg.h:471
Definition: Mcu_Cfg.h:304
Definition: Mcu_Cfg.h:272
Definition: Mcu_Cfg.h:370
Definition: Mcu_Cfg.h:407
Definition: Mcu_Cfg.h:386
Definition: Mcu_Cfg.h:315
Definition: Mcu_Cfg.h:306
Definition: Mcu_Cfg.h:394
Definition: Mcu_Cfg.h:405
Definition: Mcu_Cfg.h:424
Definition: Mcu_Cfg.h:356
Structure for data pre-setting to be initialized.
Definition: Mcu_Cfg.h:469
Definition: Mcu_Cfg.h:353
Definition: Mcu_Cfg.h:328
Definition: Mcu_Cfg.h:408
Mcu_PllStatusType
This is a status value returned by the function Mcu_GetPllStatus() of the MCU module.
Definition: Mcu_Cfg.h:420
uint64 MCU_PLL_HSDIV2
Definition: Mcu_Cfg.h:439
Definition: Mcu_Cfg.h:379
Definition: Mcu_Cfg.h:490
uint16 FracM
Definition: Mcu_Cfg.h:434
Definition: Mcu_Cfg.h:325
Definition: Mcu_Cfg.h:347
Definition: Mcu_Cfg.h:378
Definition: Mcu_Cfg.h:352
#define MCU_RESET_STATUS_NUMBER
Definition: Mcu_Cfg.h:194
Definition: Mcu_Cfg.h:331
Definition: Mcu_Cfg.h:290
Definition: Mcu_Cfg.h:324
Definition: Mcu_Cfg.h:384
Definition: Mcu_Cfg.h:385
Definition: Mcu_Cfg.h:278
uint64 MCU_PLL_CLKOUT
Definition: Mcu_Cfg.h:436
Mcu_PllClkDivType Mcu_PllClk2
Definition: Mcu_Cfg.h:449
Definition: Mcu_Cfg.h:411
Definition: Mcu_Cfg.h:334
Definition: Mcu_Cfg.h:360
Definition: Mcu_Cfg.h:422