DEENESPTFRRUARHIKOZHNL

MCU Driver (Mcu)

ModulMcu (MCU Driver)
BSW-Modul-ID101
Standard-Header#include "Mcu.h"
SWS-SpezifikationAUTOSAR_CP_SWS_MCUDriver.pdf, AUTOSAR_SWS_MCUDriver.pdf, AUTOSAR_SWS_MCU_Driver.pdf
Umfang34 Records · 6 Snippets
ClusterMikrocontroller-Abstraktion (MCAL & I/O)

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

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

फ़ंक्शन Mcu_Init [SWS_Mcu_00153] 📄 PDF

void Mcu_Init(const Mcu_ConfigType* ConfigPtr);

This service initializes the MCU driver.

फ़ंक्शन Mcu_InitClock [SWS_Mcu_00155] 📄 PDF

Std_ReturnType Mcu_InitClock(Mcu_ClockType ClockSetting);

This service initializes the PLL and other MCU specific clock options.

फ़ंक्शन Mcu_GetPllStatus [SWS_Mcu_00157] 📄 PDF

Mcu_PllStatusType Mcu_GetPllStatus(void);

This service provides the lock status of the PLL.

फ़ंक्शन Mcu_GetResetReason [SWS_Mcu_00158] 📄 PDF

Mcu_ResetType Mcu_GetResetReason(void);

The service reads the reset type from the hardware, if supported.

फ़ंक्शन Mcu_GetResetRawValue [SWS_Mcu_00159] 📄 PDF

Mcu_RawResetType Mcu_GetResetRawValue(void);

The service reads the reset type from the hardware register, if supported.

फ़ंक्शन Mcu_PerformReset [SWS_Mcu_00160] 📄 PDF

void Mcu_PerformReset(void);

The service performs a microcontroller reset.

फ़ंक्शन Mcu_SetMode [SWS_Mcu_00161] 📄 PDF

void Mcu_SetMode(Mcu_ModeType McuMode);

This service activates the MCU power modes.

फ़ंक्शन Mcu_GetRamState [SWS_Mcu_00207] 📄 PDF

Mcu_RamStateType Mcu_GetRamState(void);

This service provides the actual status of the microcontroller Ram. (if supported)

टाइप Mcu_ConfigType [SWS_Mcu_00249] 📄 PDF

A pointer to such a structure is provided to the MCU initialization routines for configuration.

टाइप Mcu_PllStatusType [SWS_Mcu_00250] 📄 PDF

This is a status value returned by the function Mcu_ Get Pll Status of the MCU module.

टाइप Mcu_ClockType [SWS_Mcu_00251] 📄 PDF

Specifies the identification (ID) for a clock setting, which is configured in the configuration structure

टाइप 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.

टाइप Mcu_RawResetType [SWS_Mcu_00253] 📄 PDF

This type specifies the reset reason in raw register format read from a reset status register.

टाइप 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

टाइप Mcu_RamSectionType [SWS_Mcu_00255] 📄 PDF

This type specifies the identification (ID) for a RAM section, which is conf igured in the configuration structure.

टाइप 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_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#edb077f5
Content hash
edb077f5
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_MCUDriver.pdf#nameddest=SWS_Mcu_00153

आरंभीकरण और स्थिति

Mcu_GetVersionInfo फ़ंक्शन

This service returns the version information of this module.

void Mcu_GetVersionInfo(Std_VersionInfoType* versioninfo);
Mcu_Init फ़ंक्शन

This service initializes the MCU driver.

void Mcu_Init(const Mcu_ConfigType* ConfigPtr);

सेवाएँ

Mcu_DistributePllClock फ़ंक्शन

This service activates the PLL clock to the MCU clock distribution.

Std_ReturnType Mcu_DistributePllClock(void);
Mcu_GetRamState फ़ंक्शन

This service provides the actual status of the microcontroller Ram. (if supported)

Mcu_RamStateType Mcu_GetRamState(void);
Mcu_GetResetReason फ़ंक्शन

The service reads the reset type from the hardware, if supported.

Mcu_ResetType Mcu_GetResetReason(void);
Mcu_InitClock फ़ंक्शन

This service initializes the PLL and other MCU specific clock options.

Std_ReturnType Mcu_InitClock(Mcu_ClockType ClockSetting);
Mcu_InitRamSection फ़ंक्शन

This service initializes the RAM section wise.

Std_ReturnType Mcu_InitRamSection(Mcu_RamSectionType RamSection);
Mcu_PerformReset फ़ंक्शन

The service performs a microcontroller reset.

void Mcu_PerformReset(void);
Mcu_SetMode फ़ंक्शन

This service activates the MCU power modes.

void Mcu_SetMode(Mcu_ModeType McuMode);
ResetTypeMcu_GetResetRawValue फ़ंक्शन

The service reads the reset type from the hardware register, if supported.

Mcu_RawResetType Mcu_GetResetRawValue(void);
StatusTypeMcu_GetPllStatus फ़ंक्शन

This service provides the lock status of the PLL.

Mcu_PllStatusType Mcu_GetPllStatus(void);

टाइप

Mcu_ClockType टाइप

Specifies the identification (ID) for a clock setting, which is configured in the configuration structure

Mcu_ConfigType टाइप

A pointer to such a structure is provided to the MCU initialization routines for configuration.

Mcu_ModeType टाइप

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

Mcu_PllStatusType टाइप

This is a status value returned by the function Mcu_ Get Pll Status of the MCU module.

Mcu_RamSectionType टाइप

This type specifies the identification (ID) for a RAM section, which is conf igured in the configuration structure.

Mcu_RamStateType टाइप

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.

Mcu_RawResetType टाइप

This type specifies the reset reason in raw register format read from a reset status register.

Mcu_ResetType टाइप

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.

आवश्यकताएँ

SWS_Mcu_00011 requirement

[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.⌋

SWS_Mcu_00012 requirement

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

SWS_Mcu_00056 requirement

[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.⌋

SWS_Mcu_00136 requirement

[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.⌋

SWS_Mcu_00140 requirement

[SWS_Mcu_00140] ⌈The function Mcu_DistributePllClock shall activate the PLL clock to the MCU clock distribution.⌋

SWS_Mcu_00141 requirement

[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.

SWS_Mcu_00142 requirement

[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.⌋

SWS_Mcu_00152 requirement

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

SWS_Mcu_00163 requirement

Det _ Report Error Det.h Service to report development errors.

SWS_Mcu_00166 requirement

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)

SWS_Mcu_00205 requirement

[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]).⌋

SWS_Mcu_00257 requirement

Fail criteria for MCU_E_CLOCK_FAILURE: a clock source failure occurs

SWS_Mcu_00258 requirement

Pass criteria for MCU_E_CLOCK_FAILURE: no clock source failure occur s

SWS_Mcu_00259 requirement

: The MCU Driver module shall reject configurations with partition mappings which are not supported by the implementation.

: 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.