STM32G0 MCAL 0.0.1
Tiny MCAL for educational purpose.
|
Mcu Driver header More...
#include "Mcu_Cfg.h"
Go to the source code of this file.
Functions | |
void | Mcu_Init (Mcu_ConfigType *ConfigPtr) |
MCU Initialization | |
Std_ReturnType | Mcu_InitRamSection (Mcu_RamSectionType RamSection) |
MCU RAM Initialization | |
Std_ReturnType | Mcu_InitClock (Mcu_ClkConfigType ClockSetting) |
MCU Clock Initialization | |
Std_ReturnType | Mcu_DistributePllClock (void) |
PLL to MCU Clock distribution | |
Mcu_PllStatusType | Mcu_GetPllStatus (void) |
Get PLL lock status | |
Mcu_ResetType | Mcu_GetResetReason (void) |
Get MCU reset type | |
Mcu_RawResetType | Mcu_GetResetRawValue (void) |
Get reset raw value | |
void | Mcu_PerformReset (void) |
Reset the MCU | |
void | Mcu_SetMode (Mcu_ModeType McuMode) |
Set MCU power mode | |
void | Mcu_GetVersionInfo (Std_VersionInfoType *versioninfo) |
Get version information | |
Mcu_RamStateType | Mcu_GetRamState (void) |
Get status of MCU RAM | |
Mcu Driver header
The MCU driver provides services for basic microcontroller initialization, power down functionality, reset and microcontroller specific functions required by other MCAL software modules. The initialization services allow a flexible and application related MCU initialization in addition to the start-up code.
Std_ReturnType Mcu_DistributePllClock | ( | void | ) |
PLL to MCU Clock distribution
Service to activate the PLL clock to the MCU clock distribution.
Std_ReturnType | E_OK if the command has been accepted, E_NOT_OK if the command has not been accepted e.g. due to parameter error |
Mcu_PllStatusType Mcu_GetPllStatus | ( | void | ) |
Get PLL lock status
Service which provides the lock status of the PLL
Mcu_PllStatusType | MCU_PLL_LOCKED when the PLL is locked, MCU_PLL_UNLOCKED, MCU_PLL_STATUS_UNDEFINED when status is unknown |
Mcu_RamStateType Mcu_GetRamState | ( | void | ) |
Get status of MCU RAM
Service which provides the actual status of the microcontroller RAM. (if supported)
Mcu_RamStateType | Status of the RAM Content |
Mcu_RawResetType Mcu_GetResetRawValue | ( | void | ) |
Get reset raw value
Service which reads the reset type from the hardware register, if supported
Mcu_RawResetType | Reset raw value |
Mcu_ResetType Mcu_GetResetReason | ( | void | ) |
Get MCU reset type
Service which reads the reset type from the hardware, if supported
Mcu_ResetType | MCU_POWER_ON_RESET, MCU_WATCHDOG_RESET, MCU_SW_RESET, MCU_RESET_UNDEFINED |
void Mcu_GetVersionInfo | ( | Std_VersionInfoType * | versioninfo | ) |
Get version information
Service to return the version information of this module
versioninfo | Pointer to where to store the version information of this module |
void Mcu_Init | ( | Mcu_ConfigType * | ConfigPtr | ) |
MCU Initialization
Service to initialize the MCU driver
ConfigPtr | Pointer to MCU driver configuration set |
Std_ReturnType Mcu_InitClock | ( | Mcu_ClkConfigType | ClockSetting | ) |
MCU Clock Initialization
Service to initialize the PLL and other MCU specific clock options.
ClockSetting | Pass the settings to configure Mcu clock |
Std_ReturnType | E_OK if the command has been accepted, E_NOT_OK if the command has not been accepted e.g. due to parameter error |
Std_ReturnType Mcu_InitRamSection | ( | Mcu_RamSectionType | RamSection | ) |
MCU RAM Initialization
Service to initialize the RAM section wise
RamSection | Selects RAM memory section provided in configuration set |
Std_ReturnType | E_OK if the command has been accepted, E_NOT_OK if the command has not been accepted e.g. due to parameter error |
void Mcu_PerformReset | ( | void | ) |
Reset the MCU
Service to perform a microcontroller reset
void Mcu_SetMode | ( | Mcu_ModeType | McuMode | ) |
Set MCU power mode
Service to activate the MCU power modes
McuMode | Set different MCU power modes configured in the configuration set |