MCUSW
Mcu_Cfg.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (C) 2024 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_J721E
65  Date : 2023-12-21 16:07:00
66  SW Ver : 9.1.0
67  Module Rele Ver : AUTOSAR 4.3.1 0
68 
69  This file is generated by EB Tresos
70  Do not modify this file,otherwise the software may behave in unexpected way.
71 
72  ******************************************************************************/
73 
89 #ifndef MCU_CFG_H
90 #define MCU_CFG_H
91 
92 /*********************************************************************************************************************
93  * Standard Header Files
94  *********************************************************************************************************************/
95 
96 /*********************************************************************************************************************
97  * Other Header Files
98  *********************************************************************************************************************/
99 
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
103 
109 #define MCU_VARIANT_POST_BUILD (STD_ON)
110 
111 /**********************************************************************************************************************
112  * Version Check
113  *********************************************************************************************************************/
115 #define MCU_CFG_ID (0x1U)
116 
117 
118 
119 /* Requirements: SWS_Mcu_00129 */
127 #define MCU_CFG_MAJOR_VERSION (9U)
128 
129 #define MCU_CFG_MINOR_VERSION (1U)
130 
131 #define MCU_CFG_PATCH_VERSION (0U)
132 /* @} */
133 
134 /*********************************************************************************************************************
135  * Exported enums
136  *********************************************************************************************************************/
137 
138 
139 /*********************************************************************************************************************
140  * Exported Preprocessor #define Constants
141  *********************************************************************************************************************/
143 #define MCU_DEV_ERROR_DETECT (STD_ON)
144 
145 #define MCU_GET_RAM_STATE_API (STD_OFF)
146 
147 #define MCU_INIT_CLOCK_API (STD_ON)
148 
149 #define MCU_PERFORM_RESET_API (STD_ON)
150 
151 #define MCU_GET_VERSION_INFO_API (STD_ON)
152 
153 #define MCU_INIT_RAM_API (STD_OFF)
154 
155 #define MCU_NO_PLL (STD_OFF)
156 
157 #define MCU_REGISTER_READBACK_API (STD_OFF)
158 
159 
166 #define DemConf_DemEventParameter_MCU_DEM_NO_EVENT (0xFFFFU)
167 #define MCU_DEM_NO_EVENT DemConf_DemEventParameter_MCU_DEM_NO_EVENT
168 /* @} */
169 
170 #ifndef MCU_E_CLOCK_FAILURE
171 
172 #define MCU_E_CLOCK_FAILURE (MCU_DEM_NO_EVENT)
173 #endif
174 
176 #define MCU_PERFORM_RESET_MASK ((uint32) 0x00060000U)
177 #define MCU_PERFORM_RESET_CLEAR_MASK ((uint32) 0xFFFFFFFFU)
178 #define MCU_RST_SRC_STAT_CLEAR ((uint32) 0x190B0BU)
179 #define SW_MCU_WARM_RST ((uint32) 0x1U)
180 #define SW_MAIN_WARM_RST ((uint32) 0x2U)
181 #define SW_MAIN_POR ((uint32) 0x8U)
182 #define MCU_RESETZ ((uint32) 0x100U)
183 #define WARM_OUT_RST ((uint32) 0x10000U)
184 #define COLD_OUT_RST ((uint32) 0x80000U)
185 #define DEBUG_RST_OCCURED ((uint32) 0x100000U)
186 
187 #define rstaddr ((LLD_wkup_ctrl_mmr_cfg0Regs*)0x43000000U)
188 
190 #define MCU_ERRORRST_MASK ((Mcu_RawResetType)0xFFFF0000U)
191 
192 #define MCU_UTILS_ARRAYSIZE(array) ((sizeof (array) / \
193  sizeof ((array)[0])))
194 
195 #define MCU_RESET_STATUS_NUMBER ((uint8)0x6)
196 
197 #define ARRAYSIZE(array) ((sizeof (array) / \
198  sizeof ((array)[0])))
199 
200 
206 /*
207  * The following defines shall be used as input
208  * parameter for: Mcu_SetMode(),
209  * Mcu_InitClock()
210  * Mcu_InitRamSection()
211  */
212 
213 /*<MCU_CFG_MODEUSERCONFIG_LIST>*/
214 
215 #define McuConf_McuModeSettingConf_McuModeSettingConf_0 (0U)
216 /*</MCU_CFG_MODEUSERCONFIG_LIST>*/
217 
218 /*<MCU_CFG_CLOCKUSERCONFIG_LIST>*/
219 /*
220 * Clock configuration
221 */
222 /* The nomenclature is as per AUTOSAR_TPS_ECUConfiguration.pdf
223 */
224 #define McuConf_McuClockSettingConfig_MCU_MCAN0 (0U)
225 #define McuConf_McuClockSettingConfig_MCU_MCAN1 (1U)
226 #define McuConf_McuClockSettingConfig_MAIN_RTI_0 (2U)
227 
228 /*</MCU_CFG_CLOCKUSERCONFIG_LIST>*/
229 
230 /*
231 Reset Reason Config
232 */
233 /*<MCU_CFG_RESETREASONUSERCONFIG_LIST>*/
234 #define McuConf_McuResetReasonConf_MCU_POWER_ON_RESET (0U)
235 #define McuConf_McuResetReasonConf_MCU_WATCHDOG_RESET (1U)
236 #define McuConf_McuResetReasonConf_MCU_SW_RESET (2U)
237 #define McuConf_McuResetReasonConf_MCU_RESET_UNDEFINED (3U)
238 
239 /*</MCU_CFG_RESETREASONUSERCONFIG_LIST>*/
240 
241 
242 /*********************************************************************************************************************
243  * Exported Preprocessor #define Macros
244  *********************************************************************************************************************/
245 
246 /*********************************************************************************************************************
247  * Exported Type Declarations
248  *********************************************************************************************************************/
249 
250 /* Requirements: SWS_Mcu_00252,SWS_Mcu_00234 */
257 typedef enum
258 {
259  /* Requirements: SWS_Mcu_00134 */
267 } Mcu_ResetType;
268 
269 
270 
271 typedef enum
272 {
280 
281 
282 typedef enum
283 {
305 
313 typedef enum
314 {
409 
414 typedef enum
415 {
425 
426 /* Requirements: SWS_Mcu_00250,SWS_Mcu_00231 */
432 typedef enum
433 {
438 
442 typedef struct
443 {
444  uint16 N;
445  uint16 M2;
446  uint16 FracM;
447  uint16 sdDiv;
454 
458 typedef struct
459 {
464 
465 /* Requirements : SWS_Mcu_00256 */
470 typedef enum
471 {
475 
476 
477 /* Requirements: SWS_Mcu_00030 */
481 typedef struct
482 {
483  P2VAR(uint8, AUTOMATIC, MCU_RAM_COPY) Mcu_RamSectionBaseAddress;
490 
494 typedef P2CONST (Mcu_RamSectionConfigType, AUTOMATIC, MCU_CONFIG_DATA)
496 
500 typedef enum
501 {
505 
509 typedef P2CONST (Mcu_PllConfigType, AUTOMATIC, MCU_CONFIG_DATA)
511 
515 typedef P2FUNC (Std_ReturnType, AUTOMATIC, Mcu_CBKFunctionPtrType)
516  (uint32 moduleId, uint32 clkId, uint64 ParentId);
517 
518 typedef struct
519 {
520  uint32 rawresetval;
523 
524 
525 typedef struct
526 {
527  uint8 numFields;
529 } Mcu_ResetInfo;
530 
531 extern CONST(Mcu_ResetStatusMap,
533 
534 extern CONST(Mcu_ResetInfo, MCU_CONST) Mcu_ResetInfoTbl ;
535 
537 extern const struct Mcu_ConfigType_s McuModuleConfiguration_0;
538 
539 #ifdef __cplusplus
540 }
541 #endif
542 
543 #endif /* #ifndef MCU_CFG_H */
544 
545 /* @} */
546 
547 /**********************************************************************************************************************
548  * End of File: Mcu_Cfg.h
549  *********************************************************************************************************************/
550 
Mcu_ClkSourceIdType
This is the type of the clock source in clock tree that is selectable for peripheral....
Definition: Mcu_Cfg.h:414
Definition: Mcu_Cfg.h:324
const Mcu_ResetInfo Mcu_ResetInfoTbl
Mcu_ClkModuleIdType
Clock source config modules id enum.
Definition: Mcu_Cfg.h:313
Definition: Mcu_Cfg.h:319
Definition: Mcu_Cfg.h:473
Definition: Mcu_Cfg.h:321
Definition: Mcu_Cfg.h:369
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:257
Definition: Mcu_Cfg.h:518
Definition: Mcu_Cfg.h:361
Definition: Mcu_Cfg.h:347
Definition: Mcu_Cfg.h:403
Mcu_ModuleName
Definition: Mcu_Cfg.h:282
Mcu_PllClkDivType Mcu_PllClk1
Definition: Mcu_Cfg.h:460
Definition: Mcu_Cfg.h:277
Definition: Mcu_Cfg.h:262
Definition: Mcu_Cfg.h:275
Definition: Mcu_Cfg.h:300
Definition: Mcu_Cfg.h:376
Std_ReturnType(* Mcu_CBKFunctionPtrType)(uint32 moduleId, uint32 clkId, uint64 ParentId)
Pointer to Callback function.
Definition: Mcu_Cfg.h:516
Definition: Mcu_Cfg.h:383
Definition: Mcu_Cfg.h:358
MCU PLL CONFIG structure.
Definition: Mcu_Cfg.h:458
Definition: Mcu_Cfg.h:288
uint8 Mcu_RamDefaultValue
Definition: Mcu_Cfg.h:485
Definition: Mcu_Cfg.h:355
Definition: Mcu_Cfg.h:422
Definition: Mcu_Cfg.h:405
Definition: Mcu_Cfg.h:389
uint16 sdDiv
Definition: Mcu_Cfg.h:447
Definition: Mcu_Cfg.h:400
Definition: Mcu_Cfg.h:371
Definition: Mcu_Cfg.h:357
Definition: Mcu_Cfg.h:341
Definition: Mcu_Cfg.h:323
Mcu_RamStateType
Enumeration of ranstate queried by Mcu_GetRamState()
Definition: Mcu_Cfg.h:470
Definition: Mcu_Cfg.h:401
uint64 MCU_PLL_HSDIV3
Definition: Mcu_Cfg.h:452
Definition: Mcu_Cfg.h:353
uint64 MCU_PLL_HSDIV1
Definition: Mcu_Cfg.h:450
const Mcu_ResetStatusMap Mcu_ResetStatusMapTbl[MCU_RESET_STATUS_NUMBER]
Definition: Mcu_Cfg.h:352
Definition: Mcu_Cfg.h:388
Definition: Mcu_Cfg.h:416
Definition: Mcu_Cfg.h:392
Mcu_PllClkDivType Mcu_PllClk3
Definition: Mcu_Cfg.h:462
Definition: Mcu_Cfg.h:298
Definition: Mcu_Cfg.h:325
Definition: Mcu_Cfg.h:421
Definition: Mcu_Cfg.h:356
Mcu_DomainType
Definition: Mcu_Cfg.h:271
Definition: Mcu_Cfg.h:395
Definition: Mcu_Cfg.h:394
Definition: Mcu_Cfg.h:370
uint16 M2
Definition: Mcu_Cfg.h:445
Definition: Mcu_Cfg.h:375
Definition: Mcu_Cfg.h:374
Definition: Mcu_Cfg.h:273
Definition: Mcu_Cfg.h:435
Mcu_PllSourceIdType
Type for PLL source selection.
Definition: Mcu_Cfg.h:500
const Mcu_ResetStatusMap * resetMap
Definition: Mcu_Cfg.h:528
Definition: Mcu_Cfg.h:472
Definition: Mcu_Cfg.h:342
Definition: Mcu_Cfg.h:351
Definition: Mcu_Cfg.h:350
Definition: Mcu_Cfg.h:330
Definition: Mcu_Cfg.h:525
Definition: Mcu_Cfg.h:381
uint32 rawresetval
Definition: Mcu_Cfg.h:520
Mcu_ResetType resetReason
Definition: Mcu_Cfg.h:521
uint32 Mcu_RamSectionBytes
Definition: Mcu_Cfg.h:487
uint8 numFields
Definition: Mcu_Cfg.h:527
Definition: Mcu_Cfg.h:362
Definition: Mcu_Cfg.h:402
Definition: Mcu_Cfg.h:349
uint64 MCU_PLL_HSDIV0
Definition: Mcu_Cfg.h:449
Definition: Mcu_Cfg.h:264
Definition: Mcu_Cfg.h:334
Definition: Mcu_Cfg.h:329
Definition: Mcu_Cfg.h:286
Definition: Mcu_Cfg.h:338
Structure for enumerating the clock outputs of HSDIVIDER.
Definition: Mcu_Cfg.h:442
Definition: Mcu_Cfg.h:354
Definition: Mcu_Cfg.h:265
Definition: Mcu_Cfg.h:266
Definition: Mcu_Cfg.h:418
Definition: Mcu_Cfg.h:379
Definition: Mcu_Cfg.h:263
Definition: Mcu_Cfg.h:335
Definition: Mcu_Cfg.h:386
Definition: Mcu_Cfg.h:315
Definition: Mcu_Cfg.h:363
Definition: Mcu_Cfg.h:326
const struct Mcu_ConfigType_s McuModuleConfiguration_0
MCU Configuration struct declaration.
Definition: Mcu_Cfg.h:407
Definition: Mcu_Cfg.h:344
Definition: Mcu_Cfg.h:378
Definition: Mcu_Cfg.h:317
uint16 N
Definition: Mcu_Cfg.h:444
Definition: Mcu_Cfg.h:360
Definition: Mcu_Cfg.h:373
Definition: Mcu_Cfg.h:503
Definition: Mcu_Cfg.h:339
Definition: Mcu_Cfg.h:260
Definition: Mcu_Cfg.h:320
Definition: Mcu_Cfg.h:328
Definition: Mcu_Cfg.h:377
Definition: Mcu_Cfg.h:404
Definition: Mcu_Cfg.h:294
Definition: Mcu_Cfg.h:331
Definition: Mcu_Cfg.h:322
Definition: Mcu_Cfg.h:387
Definition: Mcu_Cfg.h:399
Definition: Mcu_Cfg.h:366
Definition: Mcu_Cfg.h:345
Definition: Mcu_Cfg.h:333
Definition: Mcu_Cfg.h:348
Definition: Mcu_Cfg.h:296
Definition: Mcu_Cfg.h:393
Definition: Mcu_Cfg.h:385
Definition: Mcu_Cfg.h:261
Definition: Mcu_Cfg.h:367
Definition: Mcu_Cfg.h:292
Definition: Mcu_Cfg.h:384
Definition: Mcu_Cfg.h:332
Definition: Mcu_Cfg.h:380
uint8 * Mcu_RamSectionBaseAddress
Definition: Mcu_Cfg.h:483
Definition: Mcu_Cfg.h:316
Definition: Mcu_Cfg.h:284
Definition: Mcu_Cfg.h:382
Definition: Mcu_Cfg.h:419
Definition: Mcu_Cfg.h:398
Definition: Mcu_Cfg.h:327
Definition: Mcu_Cfg.h:318
Definition: Mcu_Cfg.h:406
Definition: Mcu_Cfg.h:417
Definition: Mcu_Cfg.h:436
Definition: Mcu_Cfg.h:368
Structure for data pre-setting to be initialized.
Definition: Mcu_Cfg.h:481
Definition: Mcu_Cfg.h:365
Definition: Mcu_Cfg.h:340
Definition: Mcu_Cfg.h:420
Mcu_PllStatusType
This is a status value returned by the function Mcu_GetPllStatus() of the MCU module.
Definition: Mcu_Cfg.h:432
uint64 MCU_PLL_HSDIV2
Definition: Mcu_Cfg.h:451
Definition: Mcu_Cfg.h:391
Definition: Mcu_Cfg.h:502
uint16 FracM
Definition: Mcu_Cfg.h:446
Definition: Mcu_Cfg.h:337
Definition: Mcu_Cfg.h:359
Definition: Mcu_Cfg.h:390
Definition: Mcu_Cfg.h:364
#define MCU_RESET_STATUS_NUMBER
Definition: Mcu_Cfg.h:195
Definition: Mcu_Cfg.h:343
Definition: Mcu_Cfg.h:302
Definition: Mcu_Cfg.h:336
Definition: Mcu_Cfg.h:396
Definition: Mcu_Cfg.h:397
Definition: Mcu_Cfg.h:290
uint64 MCU_PLL_CLKOUT
Definition: Mcu_Cfg.h:448
Mcu_PllClkDivType Mcu_PllClk2
Definition: Mcu_Cfg.h:461
Definition: Mcu_Cfg.h:423
Definition: Mcu_Cfg.h:346
Definition: Mcu_Cfg.h:372
Definition: Mcu_Cfg.h:434