]> rtime.felk.cvut.cz Git - arc.git/blob - boards/stm32_mcbstm32/config/Mcu_Cfg.c
Cleanup of some drivers. Re-generated examples for mpc551xsim
[arc.git] / boards / stm32_mcbstm32 / config / Mcu_Cfg.c
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 #ifndef MCU_CFG_C_\r
18 #define MCU_CFG_C_\r
19 \r
20 #include "Mcu.h"\r
21 \r
22 Mcu_RamSectorSettingConfigType Mcu_RamSectorSettingConfigData[] = {\r
23   {\r
24   // This parameter shall represent the Data pre-setting to be initialized\r
25   .McuRamDefaultValue = 0,\r
26 \r
27   // This parameter shall represent the MCU RAM section base address\r
28   .McuRamSectionBaseAddress = 0,\r
29 \r
30   // This parameter shall represent the MCU RAM Section size\r
31   .McuRamSectionSize = 0xFF,\r
32   }\r
33 };\r
34
35 const Mcu_PerClockConfigType McuPerClockConfigData =
36 {
37         .AHBClocksEnable = RCC_AHBPeriph_DMA1,
38         .APB1ClocksEnable = RCC_APB1Periph_TIM2 | RCC_APB1Periph_CAN1,
39         .APB2ClocksEnable = (RCC_APB2Periph_ADC1 | RCC_APB2Periph_GPIOA |
40                                                  RCC_APB2Periph_GPIOB | RCC_APB2Periph_GPIOC | RCC_APB2Periph_AFIO),
41 };
42 \r
43 Mcu_ClockSettingConfigType Mcu_ClockSettingConfigData[] =\r
44 {\r
45   {\r
46     .McuClockReferencePointFrequency = 8000000UL,\r
47     .Pll1    = 9,\r
48     .Pll2    = 0,\r
49     .Pll3    = 0,\r
50   },\r
51 };\r
52 \r
53 \r
54 const Mcu_ConfigType McuConfigData[] = {\r
55   {\r
56   //  Enables/Disables clock failure notification. In case this feature is not supported\r
57   //  by HW the setting should be disabled.\r
58   .McuClockSrcFailureNotification = 0,\r
59 \r
60   //  This parameter shall represent the number of Modes available for the\r
61   //  MCU. calculationFormula = Number of configured McuModeSettingConf\r
62 //  .McuNumberOfMcuModes = 1, /* NOT USED */\r
63 \r
64   //  This parameter shall represent the number of RAM sectors available for\r
65   //  the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
66   //  tingConf\r
67   .McuRamSectors = 1,\r
68 \r
69   //  This parameter shall represent the number of clock setting available for\r
70   //  the MCU.\r
71   .McuClockSettings = MCU_NBR_OF_CLOCKS,\r
72 \r
73   // Default clock frequency used\r
74   .McuDefaultClockSettings = MCU_CLOCKTYPE_EXT_REF_8MHZ,\r
75 \r
76   //  This parameter relates to the MCU specific reset configuration. This ap-\r
77   //  plies to the function Mcu_PerformReset, which performs a microcontroller\r
78   //  reset using the hardware feature of the microcontroller.\r
79 //  .McuResetSetting = 0, /* NOT USED */\r
80 \r
81   //  This container contains the configuration (parameters) for the\r
82   //  Clock settings of the MCU. Please see MCU031 for more in-\r
83   //  formation on the MCU clock settings.\r
84   .McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],\r
85 \r
86   //  This container contains the configuration (parameters) for the\r
87   //  Mode setting of the MCU. Please see MCU035 for more infor-\r
88   //  mation on the MCU mode settings.\r
89 //  .McuModeSettingConfig = 0,\r
90 \r
91   //  This container contains the configuration (parameters) for the\r
92   //  RAM Sector setting. Please see MCU030 for more information\r
93   //  on RAM sec-tor settings.\r
94   .McuRamSectorSettingConfig = &Mcu_RamSectorSettingConfigData[0],\r
95   },\r
96 };\r
97 \r
98 #endif /*MCU_CFG_C_*/\r