]> rtime.felk.cvut.cz Git - arc.git/blob - boards/mpc563xsim/config/Mcu_Cfg.h
Added MCU support for MPC5633M
[arc.git] / boards / mpc563xsim / config / Mcu_Cfg.h
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16
17
18
19
20
21
22
23 #ifndef MCU_CFG_H_\r
24 #define MCU_CFG_H_\r
25 \r
26 #include "mpc55xx.h"\r
27 \r
28 #define MCU_DEV_ERROR_DETECT    STD_ON\r
29 // Preprocessor switch to enable / disable the use of the function\r
30 // Mcu_PerformReset()\r
31 #define MCU_PERFORM_RESET_API   STD_ON\r
32 \r
33 #define MCU_VERSION_INFO_API    STD_ON\r
34 \r
35 #include "Std_Types.h"\r
36 \r
37 /* FMPLL modes( atleast in 5553/5554 ) */\r
38 \r
39 typedef enum {\r
40         MCU_FMPLL_BYPASS = 0,\r
41         MCU_FMPLL_EXTERNAL_REF,\r
42         MCU_FMPLL_EXTERNAL_REF_NO_FM,\r
43         MCU_FMPLL_DUAL_CONTROLLER_MODE,\r
44 } Mcu_FMPLLmode_t;\r
45 \r
46 typedef enum {\r
47   MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
48   MCU_CLOCKTYPE_EXT_REF_66MHZ,\r
49   MCU_NBR_OF_CLOCKS,\r
50         //MCU_CLOCKTYPE_EXTERNAL_REF,\r
51         //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
52         //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
53 } Mcu_ClockType;\r
54 \r
55 typedef struct {\r
56         // This container defines a reference point in the Mcu Clock tree\r
57         // It defines the frequency which then can be used by other modules\r
58         // as an input value. Lower multiplicity is 1, as even in the\r
59         // simplest case (only one frequency is used), there is one\r
60         // frequency to be defined.\r
61         uint32 McuClockReferencePoint;\r
62 \r
63   // Phase locked loop configuration parameters for MPC551x.\r
64   uint8 PllEprediv;\r
65   uint8 PllEmfd;\r
66   uint8 PllErfd;\r
67 } Mcu_ClockSettingConfigType;\r
68 \r
69 typedef struct {\r
70         // The parameter represents the MCU Mode settings\r
71         uint32 McuMode;\r
72 } Mcu_ModeSettingConfigType;\r
73 \r
74 typedef struct {\r
75         // This parameter shall represent the Data pre-setting to be initialized\r
76         uint32 McuRamDefaultValue;\r
77 \r
78         // This parameter shall represent the MCU RAM section base address\r
79         uint32 McuRamSectionBaseAddress;\r
80 \r
81         // This parameter shall represent the MCU RAM Section size\r
82         uint32 McuRamSectionSize;\r
83 \r
84 } Mcu_RamSectorSettingConfigType;\r
85 \r
86 \r
87 // This container defines a reference point in the Mcu Clock tree. It defines\r
88 // the frequency which then can be used by other modules as an input value.\r
89 // Lower multiplicity is 1, as even in the simplest case (only one frequency is\r
90 // used), there is one frequency to be defined.\r
91 typedef struct {\r
92 \r
93         //      This is the frequency for the specific instance of the McuClockReference-\r
94         //      Point container. It shall be givn in Hz.\r
95         uint32 McuClockReferencePointFrequency;\r
96 \r
97 } Mcu_ClockReferencePointType;\r
98 \r
99 typedef struct {\r
100         //      Enables/Disables clock failure notification. In case this feature is not supported\r
101         //      by HW the setting should be disabled.\r
102         uint8   McuClockSrcFailureNotification;\r
103 \r
104         //      This parameter shall represent the number of Modes available for the\r
105         //      MCU. calculationFormula = Number of configured McuModeSettingConf\r
106         uint8 McuNumberOfMcuModes;\r
107 \r
108   //  This parameter shall represent the number of RAM sectors available for\r
109   //  the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
110   //  tingConf\r
111   uint8 McuRamSectors;\r
112 \r
113   //  This parameter shall represent the number of clock setting available for\r
114   //  the MCU.\r
115   uint8 McuClockSettings;\r
116 \r
117   // This parameter defines the default clock settings that should be used\r
118   // It is an index into the McuClockSettingsConfig\r
119   Mcu_ClockType McuDefaultClockSettings;\r
120 \r
121         //      This parameter relates to the MCU specific reset configuration. This ap-\r
122         //      plies to the function Mcu_PerformReset, which performs a microcontroller\r
123         //      reset using the hardware feature of the microcontroller.\r
124         uint32 McuResetSetting;\r
125 \r
126         //      This container contains the configuration (parameters) for the\r
127         //      Clock settings of the MCU. Please see MCU031 for more in-\r
128         //      formation on the MCU clock settings.\r
129         Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
130 \r
131         //      This container contains the configuration (parameters) for the\r
132         //      Mode setting of the MCU. Please see MCU035 for more information\r
133         //  on the MCU mode settings.\r
134         Mcu_ModeSettingConfigType  *McuModeSettingConfig;\r
135 \r
136         //      This container contains the configuration (parameters) for the\r
137         //      RAM Sector setting. Please see MCU030 for more information\r
138         //      on RAM sec-tor settings.\r
139         Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
140 \r
141 } Mcu_ConfigType;\r
142 \r
143 extern const Mcu_ConfigType McuConfigData[];\r
144 \r
145 #define MCU_DEFAULT_CONFIG McuConfigData[0]\r
146 \r
147 #endif /*MCU_CFG_H_*/\r