MCU Driver (Mcu)
AUTOSAR Classic Microcontroller Drivers-Modul MCU Driver (Mcu, Spezifikation: AUTOSAR_CP_SWS_MCUDriver.pdf, AUTOSAR_SWS_MCUDriver.pdf, AUTOSAR_SWS_MCU_Driver.pdf).
Funktionen — Übersicht
void Mcu_Init (const Mcu_ConfigType* ConfigPtr);This service initializes the MCU driver.Std_ReturnType Mcu_InitRamSection (Mcu_RamSectionType RamSection);This service initializes the RAM section wise.Std_ReturnType Mcu_InitClock (Mcu_ClockType ClockSetting);This service initializes the PLL and other MCU specific clock options.Std_ReturnType Mcu_DistributePllClock (void);This service activates the PLL clock to the MCU clock distribution.Mcu_PllStatusType Mcu_GetPllStatus (void);This service provides the lock status of the PLL.Mcu_ResetType Mcu_GetResetReason (void);The service reads the reset type from the hardware, if supported.Mcu_RawResetType Mcu_GetResetRawValue (void);The service reads the reset type from the hardware register, if supported.void Mcu_PerformReset (void);The service performs a microcontroller reset.void Mcu_SetMode (Mcu_ModeType McuMode);This service activates the MCU power modes.void Mcu_GetVersionInfo (Std_VersionInfoType* versioninfo);This service returns the version information of this module.Mcu_RamStateType Mcu_GetRamState (void);This service provides the actual status of the microcontroller Ram.
Typen — Übersicht
struct Mcu_ConfigTypeA pointer to such a structure is provided to the MCU initialization routines for configuration.enum Mcu_PllStatusTypeThis is a status value returned by the function Mcu_ Get Pll Status of the MCU module.struct Mcu_ClockTypeSpecifies the identification (ID) for a clock setting, which is configured in the configuration structureenum Mcu_ResetTypeThis is the type of the reset enumerator containing the subset of reset types.struct Mcu_RawResetTypeThis type specifies the reset reason in raw register format read from a reset status register.struct Mcu_ModeTypeName Mcu_ Mode Type Kind Type Derived from uint Range 0.struct Mcu_RamSectionTypeThis type specifies the identification (ID) for a RAM section, which is conf igured in the configuration structure.enum Mcu_RamStateTypeThis is the Ram State data type returned by the function Mcu_ Get Ram State of the Mcu module.
Anforderungen — Übersicht
SWS_Mcu_00011[SWS_Mcu_00011] ⌈The function Mcu_InitRamSection shall fill the memory from address McuRamSectionBaseAddress up to address...SWS_Mcu_00012Type of error Related error code Error value API service called with wrong parameter MCU_ E_ PARAM_ CONFIG 0x0A API service...SWS_Mcu_00056[SWS_Mcu_00056] ⌈The function Mcu_DistributePllClock shall return without affecting the MCU hardware if the PLL clock has been...SWS_Mcu_00136[SWS_Mcu_00136] ⌈The MCU module’s environment shall call the function Mcu_- InitRamSection only after the MCU module has been...SWS_Mcu_00140[SWS_Mcu_00140] ⌈The function Mcu_DistributePllClock shall activate the PLL clock to the MCU clock distribution.SWS_Mcu_00141[SWS_Mcu_00141] ⌈The function Mcu_DistributePllClock shall remove the cur- rent clock source (for example internal oscillator...SWS_Mcu_00142[SWS_Mcu_00142] ⌈If the function Mcu_DistributePllClock is called before PLL has locked, this function shall return E_NOT_OK...SWS_Mcu_00152Module Header File Imported Type Dem Rte_ Dem_ Type.SWS_Mcu_00163Det _ Report Error Det.SWS_Mcu_00166Dem _ Set - Event Status Dem.SWS_Mcu_00205[SWS_Mcu_00205] ⌈The function Mcu_DistributePllClock shall be available if the pre-compile parameter McuNoPll is set to FALSE.SWS_Mcu_00257Fail criteria for MCU_E_CLOCK_FAILURE: a clock source failure occursSWS_Mcu_00258Pass criteria for MCU_E_CLOCK_FAILURE: no clock source failure occur sSWS_Mcu_00259: The MCU Driver module shall reject configurations with partition mappings which are not supported by the implementation.SWS_Mcu_CONSTR_00001: The module will operate as an independent instance in each of the partitions, means the called API will only tar get the...
Funktionen & Typen — Detailansicht
function Mcu_Init [SWS_Mcu_00153] 📄 PDF
void Mcu_Init(const Mcu_ConfigType* ConfigPtr);
This service initializes the MCU driver.
function Mcu_InitRamSection [SWS_Mcu_00154] 📄 PDF
Std_ReturnType Mcu_InitRamSection(Mcu_RamSectionType RamSection);
This service initializes the RAM section wise.
function Mcu_InitClock [SWS_Mcu_00155] 📄 PDF
Std_ReturnType Mcu_InitClock(Mcu_ClockType ClockSetting);
This service initializes the PLL and other MCU specific clock options.
function Mcu_DistributePllClock [SWS_Mcu_00156] 📄 PDF
Std_ReturnType Mcu_DistributePllClock(void);
This service activates the PLL clock to the MCU clock distribution.
function Mcu_GetPllStatus [SWS_Mcu_00157] 📄 PDF
Mcu_PllStatusType Mcu_GetPllStatus(void);
This service provides the lock status of the PLL.
function Mcu_GetResetReason [SWS_Mcu_00158] 📄 PDF
Mcu_ResetType Mcu_GetResetReason(void);
The service reads the reset type from the hardware, if supported.
function Mcu_GetResetRawValue [SWS_Mcu_00159] 📄 PDF
Mcu_RawResetType Mcu_GetResetRawValue(void);
The service reads the reset type from the hardware register, if supported.
function Mcu_PerformReset [SWS_Mcu_00160] 📄 PDF
void Mcu_PerformReset(void);
The service performs a microcontroller reset.
function Mcu_SetMode [SWS_Mcu_00161] 📄 PDF
void Mcu_SetMode(Mcu_ModeType McuMode);
This service activates the MCU power modes.
function Mcu_GetVersionInfo [SWS_Mcu_00162] 📄 PDF
void Mcu_GetVersionInfo(Std_VersionInfoType* versioninfo);
This service returns the version information of this module.
function Mcu_GetRamState [SWS_Mcu_00207] 📄 PDF
Mcu_RamStateType Mcu_GetRamState(void);
This service provides the actual status of the microcontroller Ram. (if supported)
type Mcu_ConfigType [SWS_Mcu_00249] 📄 PDF
A pointer to such a structure is provided to the MCU initialization routines for configuration.
type Mcu_PllStatusType [SWS_Mcu_00250] 📄 PDF
This is a status value returned by the function Mcu_ Get Pll Status of the MCU module.
type Mcu_ClockType [SWS_Mcu_00251] 📄 PDF
Specifies the identification (ID) for a clock setting, which is configured in the configuration structure
type Mcu_ResetType [SWS_Mcu_00252] 📄 PDF
This is the type of the reset enumerator containing the subset of reset types. It is not required that all reset types are supported by hardware.
type Mcu_RawResetType [SWS_Mcu_00253] 📄 PDF
This type specifies the reset reason in raw register format read from a reset status register.
type Mcu_ModeType [SWS_Mcu_00254] 📄 PDF
Name Mcu_ Mode Type Kind Type Derived from uint Range 0..<number of MCU modes> - 1 -- The range is dependent on the number of MCU modes provided in the configuration structure. The type shall be chosen depending on MCU platform for best performance. Des cription This type specifies the identification (ID) for a MCU mode, which is configured in the configuration structure. Available via Mcu.h
type Mcu_RamSectionType [SWS_Mcu_00255] 📄 PDF
This type specifies the identification (ID) for a RAM section, which is conf igured in the configuration structure.
type Mcu_RamStateType [SWS_Mcu_00256] 📄 PDF
This is the Ram State data type returned by the function Mcu_ Get Ram State of the Mcu module. It is not required that all RAM state types are supported by the hardware.
requirement SWS_Mcu_00011 [SWS_Mcu_00011] 📄 PDF
[SWS_Mcu_00011] ⌈The function Mcu_InitRamSection shall fill the memory from address McuRamSectionBaseAddress up to address McuRamSectionBaseAd- dress + McuRamSectionSize-1 with the byte-value contained in McuRamDefault- Value and by writing at once a number of bytes defined by McuRamSectionWrite- Size, where McuRamSectionBaseAddress, McuRamSectionSize, McuRamDe- faultValue and McuRamSectionWriteSize are the values of the configuration parameters for each RamSection.⌋
requirement SWS_Mcu_00012 [SWS_Mcu_00012] 📄 PDF
Type of error Related error code Error value API service called with wrong parameter MCU_ E_ PARAM_ CONFIG 0x0A API service called with wrong parameter MCU_ E_ PARAM_ CLOCK 0x0B API service called with wrong parameter MCU_ E_ PARAM_ MODE 0x0C API service called with wrong parameter MCU_ E_ PARAM_ RAMSECTION 0x0D API service called with wrong parameter MCU_ E_ PLL_ NOT_ LOCKED 0x0E API service called with wrong parameter MCU_ E_ UNINIT 0x0F API service called with wrong parameter MCU_ E_ PARAM_ POINTER 0x10 API service called with wrong parameter MCU_ E_ INIT_ FAILED 0x11
requirement SWS_Mcu_00056 [SWS_Mcu_00056] 📄 PDF
[SWS_Mcu_00056] ⌈The function Mcu_DistributePllClock shall return without affecting the MCU hardware if the PLL clock has been automatically activated by the MCU hardware.⌋
requirement SWS_Mcu_00136 [SWS_Mcu_00136] 📄 PDF
[SWS_Mcu_00136] ⌈The MCU module’s environment shall call the function Mcu_- InitRamSection only after the MCU module has been initialized using the function Mcu_Init.⌋
requirement SWS_Mcu_00140 [SWS_Mcu_00140] 📄 PDF
[SWS_Mcu_00140] ⌈The function Mcu_DistributePllClock shall activate the PLL clock to the MCU clock distribution.⌋
requirement SWS_Mcu_00141 [SWS_Mcu_00141] 📄 PDF
[SWS_Mcu_00141] ⌈The function Mcu_DistributePllClock shall remove the cur- rent clock source (for example internal oscillator clock) from MCU clock distribution.⌋ The MCU module’s environment shall only call the function Mcu_DistributePll- Clock after the status of the PLL has been detected as locked by the function Mcu_ GetPllStatus.
requirement SWS_Mcu_00142 [SWS_Mcu_00142] 📄 PDF
[SWS_Mcu_00142] ⌈If the function Mcu_DistributePllClock is called before PLL has locked, this function shall return E_NOT_OK immediately, without any further ac- tion.⌋
requirement SWS_Mcu_00152 [SWS_Mcu_00152] 📄 PDF
Module Header File Imported Type Dem Rte_ Dem_ Type.h Dem _ Event Id Type Rte_ Dem_ Type.h Dem _ Event Status Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type
requirement SWS_Mcu_00163 [SWS_Mcu_00163] 📄 PDF
Det _ Report Error Det.h Service to report development errors.
requirement SWS_Mcu_00166 [SWS_Mcu_00166] 📄 PDF
Dem _ Set - Event Status Dem.h Called by SW - Cs or BSW modules to report monitor status information to the Dem. BSW modules calling Dem_ Set Event Status can safely ignore the return value. This API will be available only if ({Dem/ Dem Config Set/ Dem Event Parameter/ Dem Event Reporting Type} == STANDARD_ REPORTING)
requirement SWS_Mcu_00205 [SWS_Mcu_00205] 📄 PDF
[SWS_Mcu_00205] ⌈The function Mcu_DistributePllClock shall be available if the pre-compile parameter McuNoPll is set to FALSE. Otherwise, this Api has to be disabled (see also [ECUC_Mcu_00180]).⌋
requirement SWS_Mcu_00257 [SWS_Mcu_00257] 📄 PDF
Fail criteria for MCU_E_CLOCK_FAILURE: a clock source failure occurs
requirement SWS_Mcu_00258 [SWS_Mcu_00258] 📄 PDF
Pass criteria for MCU_E_CLOCK_FAILURE: no clock source failure occur s
requirement SWS_Mcu_00259 [SWS_Mcu_00259] 📄 PDF
: The MCU Driver module shall reject configurations with partition mappings which are not supported by the implementation.
requirement SWS_Mcu_CONSTR_00001 [SWS_Mcu_CONSTR_00001] 📄 PDF
: The module will operate as an independent instance in each of the partitions, means the called API will only tar get the partition it is called in.
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/CP_MOD_Mcu- Status
- unspecified
- Version
AUTOSAR/AP/record/CP_MOD_Mcu@rel:R20-11#dd84a4f7- Content hash
dd84a4f7- Source
- https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_MCUDriver.pdf#nameddest=SWS_Mcu_00153