* Fsys = EXTAL_FREQ *( (emfd+16) / ( (eprediv+1) * ( erfd+1 )) ) )\r
*/\r
// Check ranges...\r
- assert((clockSettingsPtr->PllEmfd>=32) && (clockSettingsPtr->PllEmfd<=132));\r
- assert( (clockSettingsPtr->PllEprediv!=6) &&\r
- (clockSettingsPtr->PllEprediv!=8) &&\r
- (clockSettingsPtr->PllEprediv<10) );\r
- assert( clockSettingsPtr->PllErfd & 1); // Must be odd\r
+ assert((clockSettingsPtr->Pll2>=32) && (clockSettingsPtr->Pll2<=132));\r
+ assert( (clockSettingsPtr->Pll1 != 6) &&\r
+ (clockSettingsPtr->Pll1 != 8) &&\r
+ (clockSettingsPtr->Pll1 < 10) );\r
+ assert( clockSettingsPtr->Pll3 & 1); // Must be odd\r
#elif defined(CFG_MPC5567)\r
/* 5567 clock info:\r
* Fsys = EXTAL_FREQ *( (emfd+4) / ( (eprediv+1) * ( 2^erfd )) ) )\r
*/\r
// Check ranges...\r
- assert(clockSettingsPtr->PllEmfd < 16);\r
- assert(clockSettingsPtr->PllEprediv <= 4);\r
- assert(clockSettingsPtr->PllErfd < 8);\r
+ assert(clockSettingsPtr->Pll2 < 16);\r
+ assert(clockSettingsPtr->Pll1 <= 4);\r
+ assert(clockSettingsPtr->Pll3 < 8);\r
#endif\r
\r
\r
uint32 f_sys;\r
\r
f_sys = CALC_SYSTEM_CLOCK( extal,\r
- clockSettingsPtr->PllEmfd,\r
- clockSettingsPtr->PllEprediv,\r
- clockSettingsPtr->PllErfd );\r
+ clockSettingsPtr->Pll2,\r
+ clockSettingsPtr->Pll1,\r
+ clockSettingsPtr->Pll3 );\r
\r
//DEBUG(DEBUG_HIGH,"/drivers/mcu: F_sys will be:%08d Hz\n",f_sys);\r
}\r
FMPLL.ESYNCR1.B.CLKCFG = 7; //TODO: Hur ställa detta för 5567?\r
\r
// Write pll parameters.\r
- FMPLL.ESYNCR1.B.EPREDIV = clockSettingsPtr->PllEprediv;\r
- FMPLL.ESYNCR1.B.EMFD = clockSettingsPtr->PllEmfd;\r
- FMPLL.ESYNCR2.B.ERFD = clockSettingsPtr->PllErfd;\r
+ FMPLL.ESYNCR1.B.EPREDIV = clockSettingsPtr->Pll1;\r
+ FMPLL.ESYNCR1.B.EMFD = clockSettingsPtr->Pll2;\r
+ FMPLL.ESYNCR2.B.ERFD = clockSettingsPtr->Pll3;\r
\r
// Connect SYSCLK to FMPLL\r
SIU.SYSCLK.B.SYSCLKSEL = SYSCLOCK_SELECT_PLL;\r
FMPLL.SYNCR.B.LOLRE = 0;\r
FMPLL.SYNCR.B.LOLIRQ = 0;\r
\r
- FMPLL.SYNCR.B.PREDIV = clockSettingsPtr->PllEprediv;\r
- FMPLL.SYNCR.B.MFD = clockSettingsPtr->PllEmfd;\r
- FMPLL.SYNCR.B.RFD = clockSettingsPtr->PllErfd;\r
+ FMPLL.SYNCR.B.PREDIV = clockSettingsPtr->Pll1;\r
+ FMPLL.SYNCR.B.MFD = clockSettingsPtr->Pll2;\r
+ FMPLL.SYNCR.B.RFD = clockSettingsPtr->Pll3;\r
\r
// Wait for PLL to sync.\r
while (Mcu_GetPllStatus() != MCU_PLL_LOCKED)\r
void Mcu_SetMode(const Mcu_ModeType McuMode)\r
{\r
VALIDATE( ( 1 == Mcu_Global.initRun ), MCU_SETMODE_SERVICE_ID, MCU_E_UNINIT );\r
- VALIDATE( ( McuMode <= Mcu_Global.config->McuNumberOfMcuModes ), MCU_SETMODE_SERVICE_ID, MCU_E_PARAM_MODE );\r
+ // VALIDATE( ( McuMode <= Mcu_Global.config->McuNumberOfMcuModes ), MCU_SETMODE_SERVICE_ID, MCU_E_PARAM_MODE );\r
(void) McuMode;\r
\r
/* NOT SUPPORTED */\r
uint32_t erfd = FMPLL.SYNCR.B.RFD;\r
#endif\r
uint32_t f_sys;\r
- uint32 extal = Mcu_Global.config->McuClockSettingConfig[Mcu_Global.clockSetting].McuClockReferencePoint;\r
+ uint32 extal = Mcu_Global.config->McuClockSettingConfig[Mcu_Global.clockSetting].McuClockReferencePointFrequency;\r
\r
f_sys = CALC_SYSTEM_CLOCK(extal,emfd,eprediv,erfd);
\r
{\r
{\r
.McuClockReferencePoint = 8000000UL,\r
- .PllEprediv = 1,\r
- .PllEmfd = 104,\r
- .PllErfd = 5,\r
+ .Pll1 = 1,\r
+ .Pll2 = 104,\r
+ .Pll3 = 5,\r
},\r
{\r
.McuClockReferencePoint = 16000000UL,\r
- .PllEprediv = 3,\r
- .PllEmfd = 83,\r
- .PllErfd = 5,\r
+ .Pll1 = 3,\r
+ .Pll2 = 83,\r
+ .Pll3 = 5,\r
}\r
};\r
\r
* -------------------------------- Arctic Core ------------------------------*/
-
-
-
-
-
-
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_\r
\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
-// Preprocessor switch to enable / disable the use of the function\r
-// Mcu_PerformReset()\r
#define MCU_PERFORM_RESET_API STD_ON\r
-\r
#define MCU_VERSION_INFO_API STD_ON\r
\r
#include "Std_Types.h"\r
\r
-/* FMPLL modes( atleast in 5553/5554 ) */\r
-\r
-typedef enum {\r
- MCU_FMPLL_BYPASS = 0,\r
- MCU_FMPLL_EXTERNAL_REF,\r
- MCU_FMPLL_EXTERNAL_REF_NO_FM,\r
- MCU_FMPLL_DUAL_CONTROLLER_MODE,\r
-} Mcu_FMPLLmode_t;\r
-\r
typedef enum {\r
MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
MCU_CLOCKTYPE_EXT_REF_66MHZ,\r
MCU_NBR_OF_CLOCKS,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
- //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
} Mcu_ClockType;\r
\r
-typedef struct {\r
- // This container defines a reference point in the Mcu Clock tree\r
- // It defines the frequency which then can be used by other modules\r
- // as an input value. Lower multiplicity is 1, as even in the\r
- // simplest case (only one frequency is used), there is one\r
- // frequency to be defined.\r
- uint32 McuClockReferencePoint;\r
-\r
- // Phase locked loop configuration parameters for MPC551x.\r
- uint8 PllEprediv;\r
- uint8 PllEmfd;\r
- uint8 PllErfd;\r
-} Mcu_ClockSettingConfigType;\r
-\r
-typedef struct {\r
- // The parameter represents the MCU Mode settings\r
- uint32 McuMode;\r
-} Mcu_ModeSettingConfigType;\r
-\r
-typedef struct {\r
- // This parameter shall represent the Data pre-setting to be initialized\r
- uint32 McuRamDefaultValue;\r
-\r
- // This parameter shall represent the MCU RAM section base address\r
- uint32 McuRamSectionBaseAddress;\r
-\r
- // This parameter shall represent the MCU RAM Section size\r
- uint32 McuRamSectionSize;\r
-\r
-} Mcu_RamSectorSettingConfigType;\r
-\r
-\r
-// This container defines a reference point in the Mcu Clock tree. It defines\r
-// the frequency which then can be used by other modules as an input value.\r
-// Lower multiplicity is 1, as even in the simplest case (only one frequency is\r
-// used), there is one frequency to be defined.\r
-typedef struct {\r
-\r
- // This is the frequency for the specific instance of the McuClockReference-\r
- // Point container. It shall be givn in Hz.\r
- uint32 McuClockReferencePointFrequency;\r
-\r
-} Mcu_ClockReferencePointType;\r
-\r
-typedef struct {\r
- // Enables/Disables clock failure notification. In case this feature is not supported\r
- // by HW the setting should be disabled.\r
- uint8 McuClockSrcFailureNotification;\r
-\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- uint8 McuNumberOfMcuModes;\r
-\r
- // This parameter shall represent the number of RAM sectors available for\r
- // the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
- // tingConf\r
- uint8 McuRamSectors;\r
-\r
- // This parameter shall represent the number of clock setting available for\r
- // the MCU.\r
- uint8 McuClockSettings;\r
-\r
- // This parameter defines the default clock settings that should be used\r
- // It is an index into the McuClockSettingsConfig\r
- Mcu_ClockType McuDefaultClockSettings;\r
-\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- uint32 McuResetSetting;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Clock settings of the MCU. Please see MCU031 for more in-\r
- // formation on the MCU clock settings.\r
- Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more information\r
- // on the MCU mode settings.\r
- Mcu_ModeSettingConfigType *McuModeSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // RAM Sector setting. Please see MCU030 for more information\r
- // on RAM sec-tor settings.\r
- Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
-\r
-} Mcu_ConfigType;\r
-\r
-extern const Mcu_ConfigType McuConfigData[];\r
-\r
#define MCU_DEFAULT_CONFIG McuConfigData[0]\r
\r
#endif /*MCU_CFG_H_*/\r
{\r
{\r
.McuClockReferencePointFrequency = 16000000,\r
- .PllClock = 16000000\r
+ .Pll1 = 16000000\r
}\r
};\r
\r
#ifndef MCU_CFG_H_\r
#define MCU_CFG_H_
-
-#define CFG_MC912DG128A
\r
#define MCU_DEV_ERROR_DETECT STD_OFF\r
#define MCU_PERFORM_RESET_API STD_ON\r
* for more details.
* -------------------------------- Arctic Core ------------------------------*/
-
-
-
-
-
-
-
#ifndef MCU_CFG_C_\r
#define MCU_CFG_C_\r
\r
Mcu_ClockSettingConfigType Mcu_ClockSettingConfigData[] =\r
{\r
{\r
- .McuClockReferencePoint = 8000000UL,\r
- .PllEprediv = 1,\r
- .PllEmfd = 104,\r
- .PllErfd = 5,\r
+ .McuClockReferencePointFrequency = 8000000UL,\r
+ .Pll1 = 1,\r
+ .Pll2 = 104,\r
+ .Pll3 = 5,\r
},\r
{\r
- .McuClockReferencePoint = 16000000UL,\r
- .PllEprediv = 3,\r
- .PllEmfd = 83,\r
- .PllErfd = 5,\r
+ .McuClockReferencePointFrequency = 16000000UL,\r
+ .Pll1 = 3,\r
+ .Pll2 = 83,\r
+ .Pll3 = 5,\r
}\r
};\r
\r
// by HW the setting should be disabled.\r
.McuClockSrcFailureNotification = 0,\r
\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- .McuNumberOfMcuModes = 1, /* NOT USED */\r
-\r
// This parameter shall represent the number of RAM sectors available for\r
// the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
// tingConf\r
// Default clock frequency used\r
.McuDefaultClockSettings = MCU_CLOCKTYPE_EXT_REF_80MHZ,\r
\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- .McuResetSetting = 0, /* NOT USED */\r
-\r
// This container contains the configuration (parameters) for the\r
// Clock settings of the MCU. Please see MCU031 for more in-\r
// formation on the MCU clock settings.\r
.McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],\r
\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more infor-\r
- // mation on the MCU mode settings.\r
- .McuModeSettingConfig = 0,\r
-\r
// This container contains the configuration (parameters) for the\r
// RAM Sector setting. Please see MCU030 for more information\r
// on RAM sec-tor settings.\r
\r
#include "Std_Types.h"\r
\r
-/* FMPLL modes( atleast in 5553/5554 ) */\r
-
-/** HW specific PLL modes */
-typedef enum {\r
- MCU_FMPLL_BYPASS = 0,\r
- MCU_FMPLL_EXTERNAL_REF,\r
- MCU_FMPLL_EXTERNAL_REF_NO_FM,\r
- MCU_FMPLL_DUAL_CONTROLLER_MODE,\r
-} Mcu_FMPLLmode_t;\r
/** Symbolic names for clock settings */
typedef enum {\r
MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
MCU_CLOCKTYPE_EXT_REF_66MHZ,\r
MCU_NBR_OF_CLOCKS,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
- //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
} Mcu_ClockType;\r
\r
-/** Defines clock settings */
-typedef struct {\r
- /** PLL input frequency for this clock setting. */
- uint32 McuClockReferencePoint;\r
-\r
- /** PLL configuration parameter for MPC551x. */
- uint8 PllEprediv;
- /** PLL configuration parameter for MPC551x. */
- uint8 PllEmfd;
- /** PLL configuration parameter for MPC551x. */
- uint8 PllErfd;\r
-} Mcu_ClockSettingConfigType;\r
-
-/** Not used */
-typedef struct {\r
- /** The parameter represents the MCU Mode settings */
- uint32 McuMode;\r
-} Mcu_ModeSettingConfigType;\r
-
-/** Not used */
-typedef struct {\r
- /** This parameter shall represent the Data pre-setting to be initialized */
- uint32 McuRamDefaultValue;\r
-\r
- /** This parameter shall represent the MCU RAM section base address */
- uint32 McuRamSectionBaseAddress;\r
-\r
- /** This parameter shall represent the MCU RAM Section size */
- uint32 McuRamSectionSize;\r
-\r
-} Mcu_RamSectorSettingConfigType;\r
-\r
-\r
-/** Not used */
-typedef struct {\r
-\r
- /** This is the frequency for the specific instance of the McuClockReference-
- * Point container. It shall be given in Hz. */
- uint32 McuClockReferencePointFrequency;\r
-\r
-} Mcu_ClockReferencePointType;\r
-
-/** Top level configuration container */
-typedef struct {\r
- /** Enables/Disables clock failure notification. In case this feature is not supported
- * by HW the setting should be disabled. */
- uint8 McuClockSrcFailureNotification;\r
-\r
- /** This parameter shall represent the number of Modes available for the
- * MCU. calculationFormula = Number of configured McuModeSettingConf */
- uint8 McuNumberOfMcuModes;\r
-\r
- /** This parameter shall represent the number of RAM sectors available for
- * the MCU. calculationFormula = Number of configured McuRamSectorSet-
- * tingConf */
- uint8 McuRamSectors;\r
-\r
- /** This parameter shall represent the number of clock setting available for
- * the MCU. */
- uint8 McuClockSettings;\r
-\r
- /** This parameter defines the default clock settings that should be used
- * It is an index into the McuClockSettingsConfig */
- Mcu_ClockType McuDefaultClockSettings;\r
-\r
- /** This parameter relates to the MCU specific reset configuration. This ap-
- * plies to the function Mcu_PerformReset, which performs a microcontroller
- * reset using the hardware feature of the microcontroller. */
- uint32 McuResetSetting;\r
-\r
- /** This container contains the configuration (parameters) for the
- * Clock settings of the MCU. Please see MCU031 for more in-
- * formation on the MCU clock settings. */
- Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
-\r
- /** This container contains the configuration (parameters) for the
- * Mode setting of the MCU. Please see MCU035 for more information
- * on the MCU mode settings. */
- Mcu_ModeSettingConfigType *McuModeSettingConfig;\r
-\r
- /** This container contains the configuration (parameters) for the
- * RAM Sector setting. Please see MCU030 for more information
- * on RAM sector settings. */
- Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
-\r
-} Mcu_ConfigType;\r
-\r
-extern const Mcu_ConfigType McuConfigData[];\r
\r
#define MCU_DEFAULT_CONFIG McuConfigData[0]\r
\r
{\r
{\r
.McuClockReferencePoint = 8000000UL,\r
- .PllEprediv = 1,\r
- .PllEmfd = 104,\r
- .PllErfd = 5,\r
+ .Pll1 = 1,\r
+ .Pll2 = 104,\r
+ .Pll3 = 5,\r
},\r
{\r
.McuClockReferencePoint = 16000000UL,\r
- .PllEprediv = 3,\r
- .PllEmfd = 83,\r
- .PllErfd = 5,\r
+ .Pll1 = 3,\r
+ .Pll2 = 83,\r
+ .Pll3 = 5,\r
}\r
};\r
\r
// by HW the setting should be disabled.\r
.McuClockSrcFailureNotification = 0,\r
\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- .McuNumberOfMcuModes = 1, /* NOT USED */\r
-\r
// This parameter shall represent the number of RAM sectors available for\r
// the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
// tingConf\r
// the MCU.\r
.McuClockSettings = MCU_NBR_OF_CLOCKS,\r
\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- .McuResetSetting = 0, /* NOT USED */\r
-\r
// This container contains the configuration (parameters) for the\r
// Clock settings of the MCU. Please see MCU031 for more in-\r
// formation on the MCU clock settings.\r
.McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],\r
\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more infor-\r
- // mation on the MCU mode settings.\r
- .McuModeSettingConfig = 0,\r
-\r
// This container contains the configuration (parameters) for the\r
// RAM Sector setting. Please see MCU030 for more information\r
// on RAM sec-tor settings.\r
#include "mpc55xx.h"\r
\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
-// Preprocessor switch to enable / disable the use of the function\r
-// Mcu_PerformReset()\r
#define MCU_PERFORM_RESET_API STD_ON\r
-\r
#define MCU_VERSION_INFO_API STD_ON\r
\r
#include "Std_Types.h"\r
\r
-/* FMPLL modes( atleast in 5553/5554 ) */\r
-\r
-typedef enum {\r
- MCU_FMPLL_BYPASS = 0,\r
- MCU_FMPLL_EXTERNAL_REF,\r
- MCU_FMPLL_EXTERNAL_REF_NO_FM,\r
- MCU_FMPLL_DUAL_CONTROLLER_MODE,\r
-} Mcu_FMPLLmode_t;\r
-\r
typedef enum {\r
MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
MCU_CLOCKTYPE_EXT_REF_66MHZ,\r
MCU_NBR_OF_CLOCKS,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
- //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
} Mcu_ClockType;\r
\r
-typedef struct {\r
- // This container defines a reference point in the Mcu Clock tree\r
- // It defines the frequency which then can be used by other modules\r
- // as an input value. Lower multiplicity is 1, as even in the\r
- // simplest case (only one frequency is used), there is one\r
- // frequency to be defined.\r
- uint32 McuClockReferencePoint;\r
-\r
- // Phase locked loop configuration parameters for MPC551x.\r
- uint8 PllEprediv;\r
- uint8 PllEmfd;\r
- uint8 PllErfd;\r
-} Mcu_ClockSettingConfigType;\r
-\r
-typedef struct {\r
- // The parameter represents the MCU Mode settings\r
- uint32 McuMode;\r
-} Mcu_ModeSettingConfigType;\r
-\r
-typedef struct {\r
- // This parameter shall represent the Data pre-setting to be initialized\r
- uint32 McuRamDefaultValue;\r
-\r
- // This parameter shall represent the MCU RAM section base address\r
- uint32 McuRamSectionBaseAddress;\r
-\r
- // This parameter shall represent the MCU RAM Section size\r
- uint32 McuRamSectionSize;\r
-\r
-} Mcu_RamSectorSettingConfigType;\r
-\r
-\r
-// This container defines a reference point in the Mcu Clock tree. It defines\r
-// the frequency which then can be used by other modules as an input value.\r
-// Lower multiplicity is 1, as even in the simplest case (only one frequency is\r
-// used), there is one frequency to be defined.\r
-typedef struct {\r
-\r
- // This is the frequency for the specific instance of the McuClockReference-\r
- // Point container. It shall be givn in Hz.\r
- uint32 McuClockReferencePointFrequency;\r
-\r
-} Mcu_ClockReferencePointType;\r
-\r
-typedef struct {\r
- // Enables/Disables clock failure notification. In case this feature is not supported\r
- // by HW the setting should be disabled.\r
- uint8 McuClockSrcFailureNotification;\r
-\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- uint8 McuNumberOfMcuModes;\r
-\r
- // This parameter shall represent the number of RAM sectors available for\r
- // the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
- // tingConf\r
- uint8 McuRamSectors;\r
-\r
- // This parameter shall represent the number of clock setting available for\r
- // the MCU.\r
- uint8 McuClockSettings;\r
-\r
- // This parameter defines the default clock settings that should be used\r
- // It is an index into the McuClockSettingsConfig\r
- Mcu_ClockType McuDefaultClockSettings;\r
-\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- uint32 McuResetSetting;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Clock settings of the MCU. Please see MCU031 for more in-\r
- // formation on the MCU clock settings.\r
- Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more information\r
- // on the MCU mode settings.\r
- Mcu_ModeSettingConfigType *McuModeSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // RAM Sector setting. Please see MCU030 for more information\r
- // on RAM sec-tor settings.\r
- Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
-\r
-} Mcu_ConfigType;\r
-\r
-extern const Mcu_ConfigType McuConfigData[];\r
-\r
#define MCU_DEFAULT_CONFIG McuConfigData[0]\r
\r
#endif /*MCU_CFG_H_*/\r
{\r
{\r
.McuClockReferencePoint = 8000000UL,\r
- .PllEprediv = 1,\r
- .PllEmfd = 104,\r
- .PllErfd = 5,\r
+ .Pll1 = 1,\r
+ .Pll2 = 104,\r
+ .Pll3 = 5,\r
},\r
{\r
.McuClockReferencePoint = 16000000UL,\r
- .PllEprediv = 3,\r
- .PllEmfd = 83,\r
- .PllErfd = 5,\r
+ .Pll1 = 3,\r
+ .Pll2 = 83,\r
+ .Pll3 = 5,\r
}\r
};\r
\r
// by HW the setting should be disabled.\r
.McuClockSrcFailureNotification = 0,\r
\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- .McuNumberOfMcuModes = 1, /* NOT USED */\r
-\r
// This parameter shall represent the number of RAM sectors available for\r
// the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
// tingConf\r
// the MCU.\r
.McuClockSettings = MCU_NBR_OF_CLOCKS,\r
\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- .McuResetSetting = 0, /* NOT USED */\r
-\r
// This container contains the configuration (parameters) for the\r
// Clock settings of the MCU. Please see MCU031 for more in-\r
// formation on the MCU clock settings.\r
.McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],\r
\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more infor-\r
- // mation on the MCU mode settings.\r
- .McuModeSettingConfig = 0,\r
-\r
// This container contains the configuration (parameters) for the\r
// RAM Sector setting. Please see MCU030 for more information\r
// on RAM sec-tor settings.\r
#include "mpc55xx.h"\r
\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
-// Preprocessor switch to enable / disable the use of the function\r
-// Mcu_PerformReset()\r
#define MCU_PERFORM_RESET_API STD_ON\r
-\r
#define MCU_VERSION_INFO_API STD_ON\r
\r
#include "Std_Types.h"\r
\r
/* FMPLL modes( atleast in 5553/5554 ) */\r
-\r
typedef enum {\r
MCU_FMPLL_BYPASS = 0,\r
MCU_FMPLL_EXTERNAL_REF,\r
MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
MCU_CLOCKTYPE_EXT_REF_66MHZ,\r
MCU_NBR_OF_CLOCKS,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
- //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
} Mcu_ClockType;\r
\r
-typedef struct {\r
- // This container defines a reference point in the Mcu Clock tree\r
- // It defines the frequency which then can be used by other modules\r
- // as an input value. Lower multiplicity is 1, as even in the\r
- // simplest case (only one frequency is used), there is one\r
- // frequency to be defined.\r
- uint32 McuClockReferencePoint;\r
-\r
- // Phase locked loop configuration parameters for MPC551x.\r
- uint8 PllEprediv;\r
- uint8 PllEmfd;\r
- uint8 PllErfd;\r
-} Mcu_ClockSettingConfigType;\r
-\r
-typedef struct {\r
- // The parameter represents the MCU Mode settings\r
- uint32 McuMode;\r
-} Mcu_ModeSettingConfigType;\r
-\r
-typedef struct {\r
- // This parameter shall represent the Data pre-setting to be initialized\r
- uint32 McuRamDefaultValue;\r
-\r
- // This parameter shall represent the MCU RAM section base address\r
- uint32 McuRamSectionBaseAddress;\r
-\r
- // This parameter shall represent the MCU RAM Section size\r
- uint32 McuRamSectionSize;\r
-\r
-} Mcu_RamSectorSettingConfigType;\r
-\r
-\r
-// This container defines a reference point in the Mcu Clock tree. It defines\r
-// the frequency which then can be used by other modules as an input value.\r
-// Lower multiplicity is 1, as even in the simplest case (only one frequency is\r
-// used), there is one frequency to be defined.\r
-typedef struct {\r
-\r
- // This is the frequency for the specific instance of the McuClockReference-\r
- // Point container. It shall be givn in Hz.\r
- uint32 McuClockReferencePointFrequency;\r
-\r
-} Mcu_ClockReferencePointType;\r
-\r
-typedef struct {\r
- // Enables/Disables clock failure notification. In case this feature is not supported\r
- // by HW the setting should be disabled.\r
- uint8 McuClockSrcFailureNotification;\r
-\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- uint8 McuNumberOfMcuModes;\r
-\r
- // This parameter shall represent the number of RAM sectors available for\r
- // the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
- // tingConf\r
- uint8 McuRamSectors;\r
-\r
- // This parameter shall represent the number of clock setting available for\r
- // the MCU.\r
- uint8 McuClockSettings;\r
-\r
- // This parameter defines the default clock settings that should be used\r
- // It is an index into the McuClockSettingsConfig\r
- Mcu_ClockType McuDefaultClockSettings;\r
-\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- uint32 McuResetSetting;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Clock settings of the MCU. Please see MCU031 for more in-\r
- // formation on the MCU clock settings.\r
- Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more information\r
- // on the MCU mode settings.\r
- Mcu_ModeSettingConfigType *McuModeSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // RAM Sector setting. Please see MCU030 for more information\r
- // on RAM sec-tor settings.\r
- Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
-\r
-} Mcu_ConfigType;\r
-\r
-extern const Mcu_ConfigType McuConfigData[];\r
-\r
#define MCU_DEFAULT_CONFIG McuConfigData[0]\r
\r
#endif /*MCU_CFG_H_*/\r
{\r
{\r
.McuClockReferencePoint = 16000000UL,\r
- .PllEprediv = 2,\r
- .PllEmfd = 11,\r
- .PllErfd = 0,\r
+ .Pll1 = 2,\r
+ .Pll2 = 11,\r
+ .Pll3 = 0,\r
},\r
};\r
\r
// by HW the setting should be disabled.\r
.McuClockSrcFailureNotification = 0,\r
\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- .McuNumberOfMcuModes = 1, /* NOT USED */\r
-\r
// This parameter shall represent the number of RAM sectors available for\r
// the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
// tingConf\r
// Default clock frequency used\r
.McuDefaultClockSettings = MCU_CLOCKTYPE_EXT_REF_80MHZ,\r
\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- .McuResetSetting = 0, /* NOT USED */\r
-\r
// This container contains the configuration (parameters) for the\r
// Clock settings of the MCU. Please see MCU031 for more in-\r
// formation on the MCU clock settings.\r
.McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],\r
\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more infor-\r
- // mation on the MCU mode settings.\r
- .McuModeSettingConfig = 0,\r
-\r
// This container contains the configuration (parameters) for the\r
// RAM Sector setting. Please see MCU030 for more information\r
// on RAM sec-tor settings.\r
#include "mpc55xx.h"\r
\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
-// Preprocessor switch to enable / disable the use of the function\r
-// Mcu_PerformReset()\r
#define MCU_PERFORM_RESET_API STD_ON\r
-\r
#define MCU_VERSION_INFO_API STD_ON\r
\r
#include "Std_Types.h"\r
\r
-/* FMPLL modes( atleast in 5553/5554 ) */\r
-\r
-typedef enum {\r
- MCU_FMPLL_BYPASS = 0,\r
- MCU_FMPLL_EXTERNAL_REF,\r
- MCU_FMPLL_EXTERNAL_REF_NO_FM,\r
- MCU_FMPLL_DUAL_CONTROLLER_MODE,\r
-} Mcu_FMPLLmode_t;\r
-\r
typedef enum {\r
MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
MCU_NBR_OF_CLOCKS,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
- //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
} Mcu_ClockType;\r
\r
-//\r
-//typedef enum {\r
-// CPU_Z1=0,\r
-// CPU_Z0,\r
-//} Cpu_t;\r
-//\r
-//typedef enum\r
-//{\r
-// /* Software interrupts. */\r
-// INTC_SSCIR0_CLR0,\r
-// INTC_SSCIR0_CLR1,\r
-// INTC_SSCIR0_CLR2,\r
-// INTC_SSCIR0_CLR3,\r
-// INTC_SSCIR0_CLR4,\r
-// INTC_SSCIR0_CLR5,\r
-// INTC_SSCIR0_CLR6,\r
-// INTC_SSCIR0_CLR7,\r
-// MCM_MSWTIR_SWTIC,\r
-// MCM_ESR_COMB,\r
-// /* eDMA */\r
-// EDMA_ERRL_ERR31_0,\r
-// EDMA_INTL_INT0,\r
-// EDMA_INTL_INT1,\r
-// EDMA_INTL_INT2,\r
-// EDMA_INTL_INT3,\r
-// EDMA_INTL_INT4,\r
-// EDMA_INTL_INT5,\r
-// EDMA_INTL_INT6,\r
-// EDMA_INTL_INT7,\r
-// EDMA_INTL_INT8,\r
-// EDMA_INTL_INT9,\r
-// EDMA_INTL_INT10,\r
-// EDMA_INTL_INT11,\r
-// EDMA_INTL_INT12,\r
-// EDMA_INTL_INT13,\r
-// EDMA_INTL_INT14,\r
-// EDMA_INTL_INT15,\r
-// RESERVED0,\r
-// RESERVED1,\r
-// RESERVED2,\r
-// RESERVED3,\r
-// RESERVED4,\r
-// RESERVED5,\r
-// RESERVED6,\r
-// RESERVED7,\r
-// RESERVED8,\r
-// RESERVED9,\r
-// RESERVED10,\r
-// RESERVED11,\r
-// RESERVED12,\r
-// RESERVED13,\r
-// RESERVED14,\r
-// RESERVED15,\r
-// /* Semahpore's */\r
-// SEMAPHORE_INT0,\r
-// SEMAPHORE_INT1,\r
-// RESERVED16,\r
-// CRP_INTERRUPT,\r
-// LVI_INTERRUPT,\r
-// IIC_A_IBSR_IBIF,\r
-// RESERVED17,\r
-// PLL_SYNSR_LOCF,\r
-// PLL_SYNSR_LOLF,\r
-// SIU_OSR_OVER,\r
-// /* External interrupts */\r
-// SIU_EISR_EIF0,\r
-// SIU_EISR_EIF1,\r
-// SIU_EISR_EIF2,\r
-// SIU_EISR_EIF3,\r
-// SIU_EISR_EIF15_4,\r
-// /* eMIOS */\r
-// EMISOS200_FLAG_F0,\r
-// EMISOS200_FLAG_F1,\r
-// EMISOS200_FLAG_F2,\r
-// EMISOS200_FLAG_F3,\r
-// EMISOS200_FLAG_F4,\r
-// EMISOS200_FLAG_F5,\r
-// EMISOS200_FLAG_F6,\r
-// EMISOS200_FLAG_F7,\r
-// EMISOS200_FLAG_F8,\r
-// EMISOS200_FLAG_F9,\r
-// EMISOS200_FLAG_F10,\r
-// EMISOS200_FLAG_F11,\r
-// EMISOS200_FLAG_F12,\r
-// EMISOS200_FLAG_F13,\r
-// EMISOS200_FLAG_F14,\r
-// EMISOS200_FLAG_F15,\r
-// EMISOS200_FLAG_F16,\r
-// EMISOS200_FLAG_F17,\r
-// EMISOS200_FLAG_F18,\r
-// EMISOS200_FLAG_F19,\r
-// EMISOS200_FLAG_F20,\r
-// EMISOS200_FLAG_F21,\r
-// EMISOS200_FLAG_F22,\r
-// EMISOS200_FLAG_F23,\r
-// /* eQADC */\r
-// EQADC_FISR_OVER,\r
-// EQADC_FISR0_NCF0,\r
-// EQADC_FISR0_PF0,\r
-// EQADC_FISR0_EOQF0,\r
-// EQADC_FISR0_CFFF0,\r
-// EQADC_FISR0_RFDF0,\r
-// EQADC_FISR1_NCF1,\r
-// EQADC_FISR1_PF1,\r
-// EQADC_FISR1_EOQF1,\r
-// EQADC_FISR1_CFFF1,\r
-// EQADC_FISR1_RFDF1,\r
-// EQADC_FISR2_NCF2,\r
-// EQADC_FISR2_PF2,\r
-// EQADC_FISR2_EOQF2,\r
-// EQADC_FISR2_CFFF2,\r
-// EQADC_FISR2_RFDF2,\r
-// EQADC_FISR3_NCF3,\r
-// EQADC_FISR3_PF3,\r
-// EQADC_FISR3_EOQF3,\r
-// EQADC_FISR3_CFFF3,\r
-// EQADC_FISR3_RFDF3,\r
-// EQADC_FISR4_NCF4,\r
-// EQADC_FISR4_PF4,\r
-// EQADC_FISR4_EOQF4,\r
-// EQADC_FISR4_CFFF4,\r
-// EQADC_FISR4_RFDF4,\r
-// EQADC_FISR5_NCF5,\r
-// EQADC_FISR5_PF5,\r
-// EQADC_FISR5_EOQF5,\r
-// EQADC_FISR5_CFFF5,\r
-// EQADC_FISR5_RFDF5,\r
-// /* SCI */\r
-// SCI_A_COMB,\r
-// SCI_B_COMB,\r
-// SCI_C_COMB,\r
-// SCI_D_COMB,\r
-// /* DSPI A,B */\r
-// DSPI_A_ISR_OVER,\r
-// DSPI_A_ISR_EOQF,\r
-// DSPI_A_ISR_TFFF,\r
-// DSPI_A_ISR_TCF,\r
-// DSPI_A_ISR_RFDF,\r
-// DSPI_B_ISR_OVER,\r
-// DSPI_B_ISR_EOQF,\r
-// DSPI_B_ISR_TFFF,\r
-// DSPI_B_ISR_TCF,\r
-// DSPI_B_ISR_RFDF,\r
-// /* FlexCAN A */\r
-// FLEXCAN_A_ESR_BOFF_INT,\r
-// FLEXCAN_A_ESR_ERR_INT,\r
-// RESERVED18,\r
-// FLEXCAN_A_IFLAG1_BUF0I,\r
-// FLEXCAN_A_IFLAG1_BUF1I,\r
-// FLEXCAN_A_IFLAG1_BUF2I,\r
-// FLEXCAN_A_IFLAG1_BUF3I,\r
-// FLEXCAN_A_IFLAG1_BUF4I,\r
-// FLEXCAN_A_IFLAG1_BUF5I,\r
-// FLEXCAN_A_IFLAG1_BUF6I,\r
-// FLEXCAN_A_IFLAG1_BUF7I,\r
-// FLEXCAN_A_IFLAG1_BUF8I,\r
-// FLEXCAN_A_IFLAG1_BUF9I,\r
-// FLEXCAN_A_IFLAG1_BUF10I,\r
-// FLEXCAN_A_IFLAG1_BUF11I,\r
-// FLEXCAN_A_IFLAG1_BUF12I,\r
-// FLEXCAN_A_IFLAG1_BUF13I,\r
-// FLEXCAN_A_IFLAG1_BUF14I,\r
-// FLEXCAN_A_IFLAG1_BUF15I,\r
-// FLEXCAN_A_IFLAG1_BUF31_16I,\r
-// FLEXCAN_A_IFLAG1_BUF63_32I,\r
-// /* Periodic interrupt timer */\r
-// PIT_PITFLG_RTIF,\r
-// PIT_PITFLG_PIT1,\r
-// PIT_PITFLG_PIT2,\r
-// PIT_PITFLG_PIT3,\r
-// PIT_PITFLG_PIT4,\r
-// PIT_PITFLG_PIT5,\r
-// PIT_PITFLG_PIT6,\r
-// PIT_PITFLG_PIT7,\r
-// PIT_PITFLG_PIT8,\r
-// /* FlexCAN B */\r
-// FLEXCAN_B_ESR_BOFF_INT,\r
-// FLEXCAN_B_ESR_ERR_INT,\r
-// RESERVED19,\r
-// FLEXCAN_B_IFLAG1_BUF0I,\r
-// FLEXCAN_B_IFLAG1_BUF1I,\r
-// FLEXCAN_B_IFLAG1_BUF2I,\r
-// FLEXCAN_B_IFLAG1_BUF3I,\r
-// FLEXCAN_B_IFLAG1_BUF4I,\r
-// FLEXCAN_B_IFLAG1_BUF5I,\r
-// FLEXCAN_B_IFLAG1_BUF6I,\r
-// FLEXCAN_B_IFLAG1_BUF7I,\r
-// FLEXCAN_B_IFLAG1_BUF8I,\r
-// FLEXCAN_B_IFLAG1_BUF9I,\r
-// FLEXCAN_B_IFLAG1_BUF10I,\r
-// FLEXCAN_B_IFLAG1_BUF11I,\r
-// FLEXCAN_B_IFLAG1_BUF12I,\r
-// FLEXCAN_B_IFLAG1_BUF13I,\r
-// FLEXCAN_B_IFLAG1_BUF14I,\r
-// FLEXCAN_B_IFLAG1_BUF15I,\r
-// FLEXCAN_B_IFLAG1_BUF31_16I,\r
-// FLEXCAN_B_IFLAG1_BUF63_32I,\r
-// /* FlexCAN C */\r
-// FLEXCAN_C_ESR_BOFF_INT,\r
-// FLEXCAN_C_ESR_ERR_INT,\r
-// RESERVED20,\r
-// FLEXCAN_C_IFLAG1_BUF0I,\r
-// FLEXCAN_C_IFLAG1_BUF1I,\r
-// FLEXCAN_C_IFLAG1_BUF2I,\r
-// FLEXCAN_C_IFLAG1_BUF3I,\r
-// FLEXCAN_C_IFLAG1_BUF4I,\r
-// FLEXCAN_C_IFLAG1_BUF5I,\r
-// FLEXCAN_C_IFLAG1_BUF6I,\r
-// FLEXCAN_C_IFLAG1_BUF7I,\r
-// FLEXCAN_C_IFLAG1_BUF8I,\r
-// FLEXCAN_C_IFLAG1_BUF9I,\r
-// FLEXCAN_C_IFLAG1_BUF10I,\r
-// FLEXCAN_C_IFLAG1_BUF11I,\r
-// FLEXCAN_C_IFLAG1_BUF12I,\r
-// FLEXCAN_C_IFLAG1_BUF13I,\r
-// FLEXCAN_C_IFLAG1_BUF14I,\r
-// FLEXCAN_C_IFLAG1_BUF15I,\r
-// FLEXCAN_C_IFLAG1_BUF31_16I,\r
-// FLEXCAN_C_IFLAG1_BUF63_32I,\r
-// /* FlexCAN D */\r
-// FLEXCAN_D_ESR_BOFF_INT,\r
-// FLEXCAN_D_ESR_ERR_INT,\r
-// RESERVED21,\r
-// FLEXCAN_D_IFLAG1_BUF0I,\r
-// FLEXCAN_D_IFLAG1_BUF1I,\r
-// FLEXCAN_D_IFLAG1_BUF2I,\r
-// FLEXCAN_D_IFLAG1_BUF3I,\r
-// FLEXCAN_D_IFLAG1_BUF4I,\r
-// FLEXCAN_D_IFLAG1_BUF5I,\r
-// FLEXCAN_D_IFLAG1_BUF6I,\r
-// FLEXCAN_D_IFLAG1_BUF7I,\r
-// FLEXCAN_D_IFLAG1_BUF8I,\r
-// FLEXCAN_D_IFLAG1_BUF9I,\r
-// FLEXCAN_D_IFLAG1_BUF10I,\r
-// FLEXCAN_D_IFLAG1_BUF11I,\r
-// FLEXCAN_D_IFLAG1_BUF12I,\r
-// FLEXCAN_D_IFLAG1_BUF13I,\r
-// FLEXCAN_D_IFLAG1_BUF14I,\r
-// FLEXCAN_D_IFLAG1_BUF15I,\r
-// FLEXCAN_D_IFLAG1_BUF31_16I,\r
-// FLEXCAN_D_IFLAG1_BUF63_32I,\r
-// /* FlexCAN E */\r
-// FLEXCAN_E_ESR_BOFF_INT,\r
-// FLEXCAN_E_ESR_ERR_INT,\r
-// RESERVED22,\r
-// FLEXCAN_E_IFLAG1_BUF0I,\r
-// FLEXCAN_E_IFLAG1_BUF1I,\r
-// FLEXCAN_E_IFLAG1_BUF2I,\r
-// FLEXCAN_E_IFLAG1_BUF3I,\r
-// FLEXCAN_E_IFLAG1_BUF4I,\r
-// FLEXCAN_E_IFLAG1_BUF5I,\r
-// FLEXCAN_E_IFLAG1_BUF6I,\r
-// FLEXCAN_E_IFLAG1_BUF7I,\r
-// FLEXCAN_E_IFLAG1_BUF8I,\r
-// FLEXCAN_E_IFLAG1_BUF9I,\r
-// FLEXCAN_E_IFLAG1_BUF10I,\r
-// FLEXCAN_E_IFLAG1_BUF11I,\r
-// FLEXCAN_E_IFLAG1_BUF12I,\r
-// FLEXCAN_E_IFLAG1_BUF13I,\r
-// FLEXCAN_E_IFLAG1_BUF14I,\r
-// FLEXCAN_E_IFLAG1_BUF15I,\r
-// FLEXCAN_E_IFLAG1_BUF31_16I,\r
-// FLEXCAN_E_IFLAG1_BUF63_32I,\r
-// /* FlexCAN F */\r
-// FLEXCAN_F_ESR_BOFF_INT,\r
-// FLEXCAN_F_ESR_ERR_INT,\r
-// RESERVED23,\r
-// FLEXCAN_F_IFLAG1_BUF0I,\r
-// FLEXCAN_F_IFLAG1_BUF1I,\r
-// FLEXCAN_F_IFLAG1_BUF2I,\r
-// FLEXCAN_F_IFLAG1_BUF3I,\r
-// FLEXCAN_F_IFLAG1_BUF4I,\r
-// FLEXCAN_F_IFLAG1_BUF5I,\r
-// FLEXCAN_F_IFLAG1_BUF6I,\r
-// FLEXCAN_F_IFLAG1_BUF7I,\r
-// FLEXCAN_F_IFLAG1_BUF8I,\r
-// FLEXCAN_F_IFLAG1_BUF9I,\r
-// FLEXCAN_F_IFLAG1_BUF10I,\r
-// FLEXCAN_F_IFLAG1_BUF11I,\r
-// FLEXCAN_F_IFLAG1_BUF12I,\r
-// FLEXCAN_F_IFLAG1_BUF13I,\r
-// FLEXCAN_F_IFLAG1_BUF14I,\r
-// FLEXCAN_F_IFLAG1_BUF15I,\r
-// FLEXCAN_F_IFLAG1_BUF31_16I,\r
-// FLEXCAN_F_IFLAG1_BUF63_32I,\r
-// RESERVED24,\r
-// RESERVED25,\r
-// RESERVED26,\r
-// RESERVED27,\r
-// RESERVED28,\r
-// RESERVED29,\r
-// RESERVED30,\r
-// RESERVED31,\r
-// /* SCI */\r
-// SCI_E_COMB,\r
-// SCI_F_COMB,\r
-// SCI_G_COMB,\r
-// SCI_H_COMB,\r
-// /* DSPI */\r
-// DSPI_C_ISR_OVER,\r
-// DSPI_C_ISR_EOQF,\r
-// DSPI_C_ISR_TFFF,\r
-// DSPI_C_ISR_TCF,\r
-// DSPI_C_ISR_RFDF,\r
-// DSPI_D_ISR_OVER,\r
-// DSPI_D_ISR_EOQF,\r
-// DSPI_D_ISR_TFFF,\r
-// DSPI_D_ISR_TCF,\r
-// DSPI_D_ISR_RFDF,\r
-// /* Flexray */\r
-// FLEXRAY_GLOB,\r
-// FLEXRAY_PRIF,\r
-// FLEXRAY_CHIF,\r
-// FLEXRAY_WUP_IF,\r
-// FLEXRAY_FBNE_F,\r
-// FLEXRAY_FANE_F,\r
-// FLEXRAY_RBIF,\r
-// FLEXRAY_TBIF,\r
-// RESERVED32,\r
-// MLB_SERVICE_REQUEST,\r
-// INTC_NUMBER_OF_INTERRUPTS,\r
-// /* End of INTC interrupts. The vectors below are used to handle exceptions. */\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS1,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS2,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS3,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS4,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS5,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS6,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS7,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS8,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS9,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS10,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS11,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS12,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS13,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS14,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS15,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS16,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS17,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS18,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS19,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS20,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS21,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS22,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS23,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS24,\r
-// RESERVED_SPACE_BEFORE_EXCEPTIONS25,\r
-// CRITICAL_INPUT_EXCEPTION,\r
-// MACHINE_CHECK_EXCEPTION,\r
-// DATA_STORAGE_EXCEPTION,\r
-// INSTRUCTION_STORAGE_EXCEPTION,\r
-// EXTERNAL_INTERRUPT, /* This is the place where the "normal" interrupts will hit the CPU... */\r
-// ALIGNMENT_EXCEPTION,\r
-// PROGRAM_EXCEPTION,\r
-// FLOATING_POINT_EXCEPTION,\r
-// SYSTEM_CALL_EXCEPTION,\r
-// AUX_EXCEPTION,\r
-// DECREMENTER_EXCEPTION,\r
-// FIXED_INTERVAL_TIMER_EXCEPTION,\r
-// WATCHDOG_TIMER_EXCEPTION,\r
-// DATA_TLB_EXCEPTION,\r
-// INSTRUCTION_TLB_EXCEPTION,\r
-// DEBUG_EXCEPTION,\r
-// NUMBER_OF_INTERRUPTS_AND_EXCEPTIONS,\r
-//}IrqType;\r
-//\r
-//typedef enum {\r
-// PERIPHERAL_CLOCK_FLEXCAN_A,\r
-// PERIPHERAL_CLOCK_FLEXCAN_B,\r
-// PERIPHERAL_CLOCK_FLEXCAN_C,\r
-// PERIPHERAL_CLOCK_FLEXCAN_D,\r
-// PERIPHERAL_CLOCK_FLEXCAN_E,\r
-// PERIPHERAL_CLOCK_FLEXCAN_F,\r
-// PERIPHERAL_CLOCK_PIT,\r
-// PERIPHERAL_CLOCK_DSPI_A,\r
-// PERIPHERAL_CLOCK_DSPI_B,\r
-// PERIPHERAL_CLOCK_DSPI_C,\r
-// PERIPHERAL_CLOCK_DSPI_D,\r
-// PERIPHERAL_CLOCK_EMIOS,\r
-// PERIPHERAL_CLOCK_ESCI_A,\r
-// PERIPHERAL_CLOCK_ESCI_B,\r
-// PERIPHERAL_CLOCK_ESCI_C,\r
-// PERIPHERAL_CLOCK_ESCI_D,\r
-// PERIPHERAL_CLOCK_ESCI_E,\r
-// PERIPHERAL_CLOCK_ESCI_F,\r
-// PERIPHERAL_CLOCK_ESCI_G,\r
-// PERIPHERAL_CLOCK_ESCI_H,\r
-// PERIPHERAL_CLOCK_IIC_A,\r
-// PERIPHERAL_CLOCK_MLB,\r
-//} McuE_PeriperalClock_t;\r
-\r
-\r
-typedef struct {\r
- // This container defines a reference point in the Mcu Clock tree\r
- // It defines the frequency which then can be used by other modules\r
- // as an input value. Lower multiplicity is 1, as even in the\r
- // simplest case (only one frequency is used), there is one\r
- // frequency to be defined.\r
- uint32 McuClockReferencePoint;\r
-\r
- // Phase locked loop configuration parameters for MPC551x.\r
- uint8 PllEprediv;\r
- uint8 PllEmfd;\r
- uint8 PllErfd;\r
-} Mcu_ClockSettingConfigType;\r
-\r
-typedef struct {\r
- // The parameter represents the MCU Mode settings\r
- uint32 McuMode;\r
-} Mcu_ModeSettingConfigType;\r
-\r
-typedef struct {\r
- // This parameter shall represent the Data pre-setting to be initialized\r
- uint32 McuRamDefaultValue;\r
-\r
- // This parameter shall represent the MCU RAM section base address\r
- uint32 McuRamSectionBaseAddress;\r
-\r
- // This parameter shall represent the MCU RAM Section size\r
- uint32 McuRamSectionSize;\r
-\r
-} Mcu_RamSectorSettingConfigType;\r
-\r
-\r
-// This container defines a reference point in the Mcu Clock tree. It defines\r
-// the frequency which then can be used by other modules as an input value.\r
-// Lower multiplicity is 1, as even in the simplest case (only one frequency is\r
-// used), there is one frequency to be defined.\r
-typedef struct {\r
-\r
- // This is the frequency for the specific instance of the McuClockReference-\r
- // Point container. It shall be givn in Hz.\r
- uint32 McuClockReferencePointFrequency;\r
-\r
-} Mcu_ClockReferencePointType;\r
-\r
-typedef struct {\r
- // Enables/Disables clock failure notification. In case this feature is not supported\r
- // by HW the setting should be disabled.\r
- uint8 McuClockSrcFailureNotification;\r
-\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- uint8 McuNumberOfMcuModes;\r
-\r
- // This parameter shall represent the number of RAM sectors available for\r
- // the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
- // tingConf\r
- uint8 McuRamSectors;\r
-\r
- // This parameter shall represent the number of clock setting available for\r
- // the MCU.\r
- uint8 McuClockSettings;\r
-\r
- // This parameter defines the default clock settings that should be used\r
- // It is an index into the McuClockSettingsConfig\r
- Mcu_ClockType McuDefaultClockSettings;\r
-\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- uint32 McuResetSetting;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Clock settings of the MCU. Please see MCU031 for more in-\r
- // formation on the MCU clock settings.\r
- Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more information\r
- // on the MCU mode settings.\r
- Mcu_ModeSettingConfigType *McuModeSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // RAM Sector setting. Please see MCU030 for more information\r
- // on RAM sec-tor settings.\r
- Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
-\r
-} Mcu_ConfigType;\r
-\r
-extern const Mcu_ConfigType McuConfigData[];\r
\r
#define MCU_DEFAULT_CONFIG McuConfigData[0]\r
\r
{\r
{\r
.McuClockReferencePoint = 8000000UL,\r
- .PllEprediv = 1,\r
- .PllEmfd = 104,\r
- .PllErfd = 5,\r
+ .Pll1 = 1,\r
+ .Pll2 = 104,\r
+ .Pll3 = 5,\r
},\r
{\r
.McuClockReferencePoint = 40000000UL,\r
- .PllEprediv = 3,\r
- .PllEmfd = 83,\r
- .PllErfd = 5,\r
+ .Pll1 = 3,\r
+ .Pll2 = 83,\r
+ .Pll3 = 5,\r
}\r
};\r
\r
// by HW the setting should be disabled.\r
.McuClockSrcFailureNotification = 0,\r
\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- .McuNumberOfMcuModes = 1, /* NOT USED */\r
-\r
// This parameter shall represent the number of RAM sectors available for\r
// the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
// tingConf\r
// the MCU.\r
.McuClockSettings = MCU_NBR_OF_CLOCKS,\r
\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- .McuResetSetting = 0, /* NOT USED */\r
-\r
// This container contains the configuration (parameters) for the\r
// Clock settings of the MCU. Please see MCU031 for more in-\r
// formation on the MCU clock settings.\r
.McuClockSettingConfig = &Mcu_ClockSettingConfigData[0],\r
\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more infor-\r
- // mation on the MCU mode settings.\r
- .McuModeSettingConfig = 0,\r
-\r
// This container contains the configuration (parameters) for the\r
// RAM Sector setting. Please see MCU030 for more information\r
// on RAM sec-tor settings.\r
#include "mpc55xx.h"\r
\r
#define MCU_DEV_ERROR_DETECT STD_ON\r
-// Preprocessor switch to enable / disable the use of the function\r
-// Mcu_PerformReset()\r
#define MCU_PERFORM_RESET_API STD_ON\r
-\r
#define MCU_VERSION_INFO_API STD_ON\r
\r
#include "Std_Types.h"\r
\r
-/* FMPLL modes( atleast in 5553/5554 ) */\r
-\r
typedef enum {\r
MCU_FMPLL_BYPASS = 0,\r
MCU_FMPLL_EXTERNAL_REF,\r
MCU_CLOCKTYPE_EXT_REF_80MHZ = 0,\r
MCU_CLOCKTYPE_EXT_REF_66MHZ,\r
MCU_NBR_OF_CLOCKS,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF,\r
- //MCU_CLOCKTYPE_EXTERNAL_REF_NO_FM,\r
- //MCU_CLOCKTYPE_DUAL_CONTROLLER_MODE,\r
} Mcu_ClockType;\r
\r
-typedef struct {\r
- // This container defines a reference point in the Mcu Clock tree\r
- // It defines the frequency which then can be used by other modules\r
- // as an input value. Lower multiplicity is 1, as even in the\r
- // simplest case (only one frequency is used), there is one\r
- // frequency to be defined.\r
- uint32 McuClockReferencePoint;\r
-\r
- // Phase locked loop configuration parameters for MPC551x.\r
- uint8 PllEprediv;\r
- uint8 PllEmfd;\r
- uint8 PllErfd;\r
-} Mcu_ClockSettingConfigType;\r
-\r
-typedef struct {\r
- // The parameter represents the MCU Mode settings\r
- uint32 McuMode;\r
-} Mcu_ModeSettingConfigType;\r
-\r
-typedef struct {\r
- // This parameter shall represent the Data pre-setting to be initialized\r
- uint32 McuRamDefaultValue;\r
-\r
- // This parameter shall represent the MCU RAM section base address\r
- uint32 McuRamSectionBaseAddress;\r
-\r
- // This parameter shall represent the MCU RAM Section size\r
- uint32 McuRamSectionSize;\r
-\r
-} Mcu_RamSectorSettingConfigType;\r
-\r
-\r
-// This container defines a reference point in the Mcu Clock tree. It defines\r
-// the frequency which then can be used by other modules as an input value.\r
-// Lower multiplicity is 1, as even in the simplest case (only one frequency is\r
-// used), there is one frequency to be defined.\r
-typedef struct {\r
-\r
- // This is the frequency for the specific instance of the McuClockReference-\r
- // Point container. It shall be givn in Hz.\r
- uint32 McuClockReferencePointFrequency;\r
-\r
-} Mcu_ClockReferencePointType;\r
-\r
-typedef struct {\r
- // Enables/Disables clock failure notification. In case this feature is not supported\r
- // by HW the setting should be disabled.\r
- uint8 McuClockSrcFailureNotification;\r
-\r
- // This parameter shall represent the number of Modes available for the\r
- // MCU. calculationFormula = Number of configured McuModeSettingConf\r
- uint8 McuNumberOfMcuModes;\r
-\r
- // This parameter shall represent the number of RAM sectors available for\r
- // the MCU. calculationFormula = Number of configured McuRamSectorSet-\r
- // tingConf\r
- uint8 McuRamSectors;\r
-\r
- // This parameter shall represent the number of clock setting available for\r
- // the MCU.\r
- uint8 McuClockSettings;\r
-\r
- // This parameter defines the default clock settings that should be used\r
- // It is an index into the McuClockSettingsConfig\r
- Mcu_ClockType McuDefaultClockSettings;\r
-\r
- // This parameter relates to the MCU specific reset configuration. This ap-\r
- // plies to the function Mcu_PerformReset, which performs a microcontroller\r
- // reset using the hardware feature of the microcontroller.\r
- uint32 McuResetSetting;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Clock settings of the MCU. Please see MCU031 for more in-\r
- // formation on the MCU clock settings.\r
- Mcu_ClockSettingConfigType * McuClockSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // Mode setting of the MCU. Please see MCU035 for more information\r
- // on the MCU mode settings.\r
- Mcu_ModeSettingConfigType *McuModeSettingConfig;\r
-\r
- // This container contains the configuration (parameters) for the\r
- // RAM Sector setting. Please see MCU030 for more information\r
- // on RAM sec-tor settings.\r
- Mcu_RamSectorSettingConfigType *McuRamSectorSettingConfig;\r
-\r
-} Mcu_ConfigType;\r
-\r
-extern const Mcu_ConfigType McuConfigData[];\r
\r
#define MCU_DEFAULT_CONFIG McuConfigData[0]\r
\r
#define MCU_GETRESETRAWVALUE_NORESETREG_RV 0x00 /**< MCU006 */
#define MCU_GETRESETRAWVALUE_UNINIT_RV 0xffffffff /**< MCU135 */
-#if defined(CFG_5553)
-/* FMPLL modes( atleast in 5553/5554 ) */
-typedef enum {
- MCU_FMPLL_BYPASS = 0,
- MCU_FMPLL_EXTERNAL_REF,
- MCU_FMPLL_EXTERNAL_REF_NO_FM,
- MCU_FMPLL_DUAL_CONTROLLER_MODE,
-} Mcu_FMPLLmode_t;
-#endif
\r
typedef enum {\r
MCU_PLL_LOCKED,\r
// Point container. It shall be givn in Hz.
uint32 McuClockReferencePointFrequency;
-#if defined(CFG_MC912DG128A)
- uint32 PllClock;
-
-#elif defined(CFG_MPC5516)
- // Phase locked loop configuration parameters for MPC551x.
- uint8 PllEprediv;
- uint8 PllEmfd;
- uint8 PllErfd;
-#endif
+ uint8 Pll1; // PLL setting 1
+ uint8 Pll2; // PLL setting 2
+ uint8 Pll3; // PLL setting 3
} Mcu_ClockSettingConfigType;