7.6. MCU
7.6.1. Types
Base type |
Type Name |
Brief |
|---|---|---|
enum |
Bitmask type for ASysCtl LOCK register (ASYSCTL_O_LOCK). |
|
enum |
This is a status value returned by the function Mcu_GetPllStatus of the MCU module. |
|
enum |
This is the type of the reset enumerator containing the subset of reset types. |
|
enum |
This is a status value returned by the function Mcu_GetRamState of the MCU module. |
|
enum |
Type of the clock sources. |
|
enum |
The following are clock sources available for Cpu Timer module. |
|
enum |
The following are clock sources available for MCAN module. |
|
enum |
The following are dividers available for MCAN module. |
|
enum |
The following are instances available for MCAN module. |
|
enum |
The following are clock sources available for XCLKOUT module. |
|
enum |
The following are dividers available for XCLKOUT. |
|
enum |
The following are dividers available for Ethercat clock. |
|
enum |
The following are values available to set enable/disable for EthcatPhyClock. |
|
enum |
The following are dividers available for HSM clock. |
|
enum |
The following are dividers available for EPWM clock. |
|
enum |
The following are dividers available for EMIF clock. |
|
enum |
The following are dividers available for LIN clock. |
|
enum |
The following are instances available for LIN module. |
|
enum |
List of low power modes. |
|
enum |
||
typedef uint8 |
This type specifies the identification (ID) for a ClockType status used by Mcu_InitClock. |
|
typedef uint32 |
This type specifies the identification (ID) for a RAW reset status returned by Mcu_GetResetRawValue. |
|
typedef uint8 |
This type specifies the identification (ID) for a MCU low power mode used in Mcu_SetMode. |
|
typedef uint8 |
This type specifies the identification (ID) for a RAM section used in Mcu_InitRamSection. |
|
typedef const Mcu_RamSectionConfigType * |
||
typedef const Mcu_PeripheralClkRegConfigType * |
||
typedef const Mcu_PeripheralResetRegConfigType * |
||
typedef const Mcu_MCanClkConfigType * |
||
typedef const Mcu_LinClkConfigType * |
||
typedef const Mcu_ClockConfigType * |
||
typedef const Mcu_ModeConfigType * |
7.6.1.1. enum Mcu_ASysCtlLockType
Enumerator |
Value |
Description |
|---|---|---|
MCU_ASYSCTL_LOCK_TSNSCTL |
0x001U |
Lock TSNSCTL register (Temperature Sensor Control) |
MCU_ASYSCTL_LOCK_ANAREFCTL |
0x002U |
Lock ANAREFCTL register (Analog Reference Control) |
MCU_ASYSCTL_LOCK_VMONCTL |
0x004U |
Lock VMONCTL register (Voltage Monitor Control) |
MCU_ASYSCTL_LOCK_CMPHPMXSEL |
0x020U |
Lock CMPHPMXSEL register (CMPSS HP positive mux CMP1-CMP10) |
MCU_ASYSCTL_LOCK_CMPLPMXSEL |
0x040U |
Lock CMPLPMXSEL register (CMPSS LP positive mux CMP1-CMP10) |
MCU_ASYSCTL_LOCK_CMPHNMXSEL |
0x080U |
Lock CMPHNMXSEL register (CMPSS HN negative mux) |
MCU_ASYSCTL_LOCK_CMPLNMXSEL |
0x100U |
Lock CMPLNMXSEL register (CMPSS LN negative mux) |
MCU_ASYSCTL_LOCK_VREGCTL |
0x200U |
Lock VREGCTL register (Voltage Regulator Control) |
MCU_ASYSCTL_LOCK_CMPHPMXSEL1 |
0x800U |
Lock CMPHPMXSEL1 register (CMPSS HP positive mux CMP11-CMP12) |
MCU_ASYSCTL_LOCK_CMPLPMXSEL1 |
0x1000U |
Lock CMPLPMXSEL1 register (CMPSS LP positive mux CMP11-CMP12) |
Brief: Bitmask type for ASysCtl LOCK register (ASYSCTL_O_LOCK).
Values can be OR-combined to lock multiple registers in a single call. Each bit corresponds to one register lock in the ASYSCTL_O_LOCK register.
Warning: These enum values MUST match the hardware register bit definitions in hw_asysctl.h (ASYSCTL_LOCK_*). The implementation relies on direct casting without bit translation to minimize cyclomatic complexity and meet HIS metrics requirements.
7.6.1.2. enum Mcu_PllStatusType
Enumerator |
Value |
Description |
|---|---|---|
MCU_PLL_LOCKED |
0U |
PLL status Locked. |
MCU_PLL_UNLOCKED |
1U |
PLL status Unlocked. |
MCU_PLL_STATUS_UNDEFINED |
2U |
PLL status undefined. |
Brief: This is a status value returned by the function Mcu_GetPllStatus of the MCU module.
7.6.1.3. enum Mcu_ResetType
Enumerator |
Value |
Description |
|---|---|---|
MCU_POWER_ON_RESET |
0U |
Power On reset. |
MCU_EXTERNAL_RESET |
1U |
External reset. |
MCU_ESM_NMI_WATCHDOG_RESET |
2U |
NMI Watchdog reset. |
MCU_WATCHDOG_RESET |
3U |
Watchdog reset |
MCU_SW_RESET |
4U |
Simulation of external reset |
MCU_ESM_RESET |
5U |
ESM reset |
MCU_RESET_UNDEFINED |
6U |
UNDEFINED reset |
Brief: This is the type of the reset enumerator containing the subset of reset types.
7.6.1.4. enum Mcu_RamStateType
Enumerator |
Value |
Description |
|---|---|---|
MCU_RAMSTATE_INVALID |
0U |
Ram state status invalid |
MCU_RAMSTATE_VALID |
1U |
Ram state status valid |
Brief: This is a status value returned by the function Mcu_GetRamState of the MCU module.
7.6.1.5. enum Mcu_ClkSourceIdType
Enumerator |
Value |
Description |
|---|---|---|
MCU_CLKSRC_OSC2 |
0x00 |
Internal Oscillator 2 |
MCU_CLKSRC_XTAL |
0x01 |
External XTAL |
MCU_CLKSRC_XTAL_SE |
0x11 |
External XTAL Single-ended mode |
MCU_CLKSRC_OSC1 |
0x02 |
Internal Oscillator 1 |
Brief: Type of the clock sources.
7.6.1.6. enum Mcu_CpuTimerClkSrc
Enumerator |
Value |
Description |
|---|---|---|
MCU_CPUTIMERCLKSRC_SYSCLK |
0U |
SYSCLK (default on reset) |
MCU_CPUTIMERCLKSRC_INTOSC1 |
1U |
Internal Oscillator 1 |
MCU_CPUTIMERCLKSRC_INTOSC2 |
2U |
Internal Oscillator 2 |
MCU_CPUTIMERCLKSRC_XTAL |
3U |
External Oscillator (XTAL) |
MCU_CPUTIMERCLKSRC_MAX |
Brief: The following are clock sources available for Cpu Timer module.
7.6.1.7. enum Mcu_MCanClkSrc
Enumerator |
Value |
Description |
|---|---|---|
MCU_MCANCLKSRC_PERxSYSCLK |
0U |
SYSCLK (default on reset) |
MCU_MCANCLKSRC_AUXCLKIN |
2U |
SYSCLK (default on reset) |
MCU_MCANCLKSRC_PLLRAWCLK |
3U |
Raw PLL Clock |
MCU_MCANCLKSRC_MAX |
Brief: The following are clock sources available for MCAN module.
7.6.1.8. enum Mcu_MCANClkDivider
Enumerator |
Value |
Description |
|---|---|---|
MCU_MCANCLK_DIV_1 |
0x0 |
MCAN clock = MCAN clock source / 1. |
MCU_MCANCLK_DIV_2 |
0x1 |
MCAN clock = MCAN clock source / 2. |
MCU_MCANCLK_DIV_3 |
0x2 |
MCAN clock = MCAN clock source / 3. |
MCU_MCANCLK_DIV_4 |
0x3 |
MCAN clock = MCAN clock source / 4. |
MCU_MCANCLK_DIV_5 |
0x4 |
MCAN clock = MCAN clock source / 5. |
MCU_MCANCLK_DIV_6 |
0x5 |
MCAN clock = MCAN clock source / 6. |
MCU_MCANCLK_DIV_7 |
0x6 |
MCAN clock = MCAN clock source / 7. |
MCU_MCANCLK_DIV_8 |
0x7 |
MCAN clock = MCAN clock source / 8. |
MCU_MCANCLK_DIV_9 |
0x8 |
MCAN clock = MCAN clock source / 9. |
MCU_MCANCLK_DIV_10 |
0x9 |
MCAN clock = MCAN clock source / 10. |
MCU_MCANCLK_DIV_11 |
0xA |
MCAN clock = MCAN clock source / 11. |
MCU_MCANCLK_DIV_12 |
0xB |
MCAN clock = MCAN clock source / 12. |
MCU_MCANCLK_DIV_13 |
0xC |
MCAN clock = MCAN clock source / 13. |
MCU_MCANCLK_DIV_14 |
0xD |
MCAN clock = MCAN clock source / 14. |
MCU_MCANCLK_DIV_15 |
0xE |
MCAN clock = MCAN clock source / 15. |
MCU_MCANCLK_DIV_16 |
0xF |
MCAN clock = MCAN clock source / 16. |
MCU_MCANCLK_DIV_17 |
0x10 |
MCAN clock = MCAN clock source / 17. |
MCU_MCANCLK_DIV_18 |
0x11 |
MCAN clock = MCAN clock source / 18. |
MCU_MCANCLK_DIV_19 |
0x12 |
MCAN clock = MCAN clock source / 19. |
MCU_MCANCLK_DIV_20 |
0x13 |
MCAN clock = MCAN clock source / 20. |
Brief: The following are dividers available for MCAN module.
7.6.1.9. enum Mcu_MCANInstance
Enumerator |
Value |
Description |
|---|---|---|
MCU_MCAN_A |
0U |
MCAN Instance A. |
MCU_MCAN_B |
1U |
MCAN Instance B. |
MCU_MCAN_C |
2U |
MCAN Instance C. |
MCU_MCAN_D |
3U |
MCAN Instance D. |
MCU_MCAN_E |
4U |
MCAN Instance E. |
MCU_MCAN_F |
5U |
MCAN Instance F. |
Brief: The following are instances available for MCAN module.
7.6.1.10. enum Mcu_ExternalClockOutClkSrc
Enumerator |
Value |
Description |
|---|---|---|
MCU_XCLKOUTSRC_PLLSYS |
0U |
PLL System Clock post SYSCLKDIV |
MCU_XCLKOUTSRC_CPU1CLK |
1U |
CPU1.CLOCK |
MCU_XCLKOUTSRC_CPU2CLK |
2U |
CPU2.CLOCK |
MCU_XCLKOUTSRC_CPU3CLK |
3U |
CPU3.CLOCK |
MCU_XCLKOUTSRC_INTOSC1 |
5U |
Internal Oscillator 1 |
MCU_XCLKOUTSRC_INTOSC2 |
6U |
Internal Oscillator 2 |
MCU_XCLKOUTSRC_XTALOSC |
7U |
External Oscillator |
Brief: The following are clock sources available for XCLKOUT module.
7.6.1.11. enum Mcu_ExternalClockOutDiv
Enumerator |
Value |
Description |
|---|---|---|
MCU_XCLKOUT_DIV_1 |
0U |
divided by 1 |
MCU_XCLKOUT_DIV_2 |
1U |
divided by 2 |
MCU_XCLKOUT_DIV_4 |
2U |
divided by 4 |
MCU_XCLKOUT_DIV_8 |
3U |
divided by 8 |
Brief: The following are dividers available for XCLKOUT.
7.6.1.12. enum Mcu_EthercatClockDiv
Enumerator |
Value |
Description |
|---|---|---|
MCU_ECATCLKOUT_DIV_1 |
0U |
divided by 1 |
MCU_ECATCLKOUT_DIV_2 |
1U |
divided by 2 |
MCU_ECATCLKOUT_DIV_3 |
2U |
divided by 3 |
MCU_ECATCLKOUT_DIV_4 |
3U |
divided by 4 |
MCU_ECATCLKOUT_DIV_5 |
4U |
divided by 5 |
MCU_ECATCLKOUT_DIV_6 |
5U |
divided by 6 |
MCU_ECATCLKOUT_DIV_7 |
6U |
divided by 7 |
MCU_ECATCLKOUT_DIV_8 |
7U |
divided by 8 |
Brief: The following are dividers available for Ethercat clock.
7.6.1.13. enum Mcu_EthercatPhyClk
Enumerator |
Value |
Description |
|---|---|---|
MCU_ECAT_PHYCLK_ENABLE |
0x100U |
Enable value 0x100. |
MCU_ECAT_PHYCLK_DISABLE |
0U |
Disable value 0. |
Brief: The following are values available to set enable/disable for EthcatPhyClock.
7.6.1.14. enum Mcu_HsmClockDiv
Enumerator |
Value |
Description |
|---|---|---|
MCU_HSMCLK_DIV_1 |
0U |
divided by 1 |
MCU_HSMCLK_DIV_2 |
1U |
divided by 2 |
MCU_HSMCLK_DIV_4 |
2U |
divided by 4 |
MCU_HSMCLK_DIV_8 |
3U |
divided by 8 |
MCU_HSMCLK_DIV_16 |
4U |
divided by 16 |
Brief: The following are dividers available for HSM clock.
7.6.1.15. enum Mcu_EPWMClkDivider
Enumerator |
Value |
Description |
|---|---|---|
MCU_EPWMCLK_DIV_1 |
0U |
EPWMCLK = PLLSYSCLK / 1. |
MCU_EPWMCLK_DIV_2 |
1U |
EPWMCLK = PLLSYSCLK / 2. |
Brief: The following are dividers available for EPWM clock.
7.6.1.16. enum Mcu_EMIFClkDivider
Enumerator |
Value |
Description |
|---|---|---|
MCU_EMIFCLK_DIV_1 |
0U |
EMIF1CLK = PLLSYSCLK / 1. |
MCU_EMIFCLK_DIV_2 |
1U |
EMIF1CLK = PLLSYSCLK / 2. |
MCU_EMIFCLK_DIV_4 |
2U |
EMIF1CLK = PLLSYSCLK / 4. |
Brief: The following are dividers available for EMIF clock.
7.6.1.17. enum Mcu_LINClkDivider
Enumerator |
Value |
Description |
|---|---|---|
MCU_LINCLK_DIV_1 |
0U |
LINCLK = PLLSYSCLK / 1. |
MCU_LINCLK_DIV_2 |
1U |
LINCLK = PLLSYSCLK / 2. |
MCU_LINCLK_DIV_4 |
2U |
LINCLK = PLLSYSCLK / 4. |
Brief: The following are dividers available for LIN clock.
7.6.1.18. enum Mcu_LINInstance
Enumerator |
Value |
Description |
|---|---|---|
MCU_LIN_A |
0U |
LIN Instance A. |
MCU_LIN_B |
1U |
LIN Instance B. |
Brief: The following are instances available for LIN module.
7.6.1.19. enum Mcu_LowPowerModeType
Enumerator |
Value |
Description |
|---|---|---|
MCU_IDLE_MODE |
0U |
MCU Idle mode. |
MCU_STANDBY_MODE |
1U |
MCU Standby mode. |
MCU_MODE_MAX |
Brief: List of low power modes.
7.6.1.20. enum Mcu_ASysCtlTestNodeType
Enumerator |
Value |
Description |
|---|---|---|
MCU_ASYSCTL_TEST_NODE_NO_CONN |
0U |
No test node connected (reset default) |
MCU_ASYSCTL_TEST_NODE_VDDCORE |
1U |
VDDCORE supply rail |
MCU_ASYSCTL_TEST_NODE_VDDA |
2U |
VDDA analog supply |
MCU_ASYSCTL_TEST_NODE_VSSA |
3U |
VSSA analog ground |
MCU_ASYSCTL_TEST_NODE_VREFLOA |
4U |
VREFLO for ADC-A |
MCU_ASYSCTL_TEST_NODE_VREFLOB |
5U |
VREFLO for ADC-B |
MCU_ASYSCTL_TEST_NODE_CDAC1H |
7U |
CDAC1 high output |
MCU_ASYSCTL_TEST_NODE_CDAC1L |
8U |
CDAC1 low output |
MCU_ASYSCTL_TEST_NODE_CDAC2H |
9U |
CDAC2 high output |
MCU_ASYSCTL_TEST_NODE_CDAC2L |
10U |
CDAC2 low output |
MCU_ASYSCTL_TEST_NODE_CDAC3H |
11U |
CDAC3 high output |
MCU_ASYSCTL_TEST_NODE_CDAC3L |
12U |
CDAC3 low output |
MCU_ASYSCTL_TEST_NODE_CDAC4H |
13U |
CDAC4 high output |
MCU_ASYSCTL_TEST_NODE_CDAC4L |
14U |
CDAC4 low output |
MCU_ASYSCTL_TEST_NODE_CDAC5H |
15U |
CDAC5 high output |
MCU_ASYSCTL_TEST_NODE_CDAC5L |
16U |
CDAC5 low output |
MCU_ASYSCTL_TEST_NODE_CDAC6H |
17U |
CDAC6 high output |
MCU_ASYSCTL_TEST_NODE_CDAC6L |
18U |
CDAC6 low output |
MCU_ASYSCTL_TEST_NODE_CDAC7H |
19U |
CDAC7 high output |
MCU_ASYSCTL_TEST_NODE_CDAC7L |
20U |
CDAC7 low output |
MCU_ASYSCTL_TEST_NODE_CDAC8H |
21U |
CDAC8 high output |
MCU_ASYSCTL_TEST_NODE_CDAC8L |
22U |
CDAC8 low output |
MCU_ASYSCTL_TEST_NODE_CDAC9H |
23U |
CDAC9 high output |
MCU_ASYSCTL_TEST_NODE_CDAC9L |
24U |
CDAC9 low output |
MCU_ASYSCTL_TEST_NODE_CDAC10H |
25U |
CDAC10 high output |
MCU_ASYSCTL_TEST_NODE_CDAC10L |
26U |
CDAC10 low output |
MCU_ASYSCTL_TEST_NODE_CDAC11H |
27U |
CDAC11 high output |
MCU_ASYSCTL_TEST_NODE_CDAC11L |
28U |
CDAC11 low output |
MCU_ASYSCTL_TEST_NODE_ENZ_CALIB_GAIN_3P3 |
29U |
Enable calibration gain 3.3V |
MCU_ASYSCTL_TEST_NODE_MAX |
Sentinel — not a valid node |
7.6.1.21. typedef Mcu_ClockType
typedef uint8 Mcu_ClockType;
Brief: This type specifies the identification (ID) for a ClockType status used by Mcu_InitClock.
7.6.1.22. typedef Mcu_RawResetType
typedef uint32 Mcu_RawResetType;
Brief: This type specifies the identification (ID) for a RAW reset status returned by Mcu_GetResetRawValue.
7.6.1.23. typedef Mcu_ModeType
typedef uint8 Mcu_ModeType;
Brief: This type specifies the identification (ID) for a MCU low power mode used in Mcu_SetMode.
7.6.1.24. typedef Mcu_RamSectionType
typedef uint8 Mcu_RamSectionType;
Brief: This type specifies the identification (ID) for a RAM section used in Mcu_InitRamSection.
7.6.1.25. typedef Mcu_RamConfigPtrType
typedef const Mcu_RamSectionConfigType* Mcu_RamConfigPtrType;
7.6.1.26. typedef Mcu_PeripheralClkRegConfigPtrType
typedef const Mcu_PeripheralClkRegConfigType* Mcu_PeripheralClkRegConfigPtrType;
7.6.1.27. typedef Mcu_PeripheralResetRegConfigPtrType
typedef const Mcu_PeripheralResetRegConfigType* Mcu_PeripheralResetRegConfigPtrType;
7.6.1.28. typedef Mcu_MCanClkConfigPtrType
typedef const Mcu_MCanClkConfigType* Mcu_MCanClkConfigPtrType;
7.6.1.29. typedef Mcu_LinClkConfigPtrType
typedef const Mcu_LinClkConfigType* Mcu_LinClkConfigPtrType;
7.6.1.30. typedef Mcu_ClockConfigPtrType
typedef const Mcu_ClockConfigType* Mcu_ClockConfigPtrType;
7.6.1.31. typedef Mcu_ModeConfigPtrType
typedef const Mcu_ModeConfigType* Mcu_ModeConfigPtrType;
7.6.2. Structures
Name |
Brief |
|---|---|
MCU CONFIG ROOT structure. |
|
Structure for data pre-setting to be initialized. |
|
Structure for LIN clock register setting. |
|
Structure for EtherCat clock setting. |
|
Structure for MCAN clock register setting. |
|
Structure for Cpu Timer clock register setting. |
|
Structure for External Clock Output setting. |
|
Structure for peripheral clock register setting. |
|
Structure for peripheral Reset register setting. |
|
Structure for device clock setting. |
|
Structure for Mcu low power mode configuration type. |
|
Single peripheral configuration register entry. |
|
Peripheral configuration type containing register entries. |
|
7.6.3. Defines
Name |
Brief |
|---|---|
MCU_SW_MAJOR_VERSION |
Driver Implementation Major Version. |
MCU_SW_MINOR_VERSION |
Driver Implementation Minor Version. |
MCU_SW_PATCH_VERSION |
Driver Implementation Patch Version. |
MCU_AR_RELEASE_MAJOR_VERSION |
AUTOSAR Major version specification implemented by MCU Driver. |
MCU_AR_RELEASE_MINOR_VERSION |
AUTOSAR Minor version specification implemented by MCU Driver. |
MCU_AR_RELEASE_REVISION_VERSION |
AUTOSAR Patch version specification implemented by MCU Driver. |
MCU_VENDOR_ID |
Texas Instruments Vendor ID. |
MCU_MODULE_ID |
MCU Driver Module ID. |
MCU_INSTANCE_ID |
MCU Instance ID. |
MCU_SID_INIT |
Service ID for Mcu_Init. |
MCU_SID_INIT_RAMSECTION |
Service ID for Mcu_InitRamSection. |
MCU_SID_INIT_CLOCK |
Service ID for Mcu_InitClock. |
MCU_SID_DISTRIBUTE_PLL_CLOCK |
Service ID for Mcu_DistributePllClock. |
MCU_SID_GET_PLL_STATUS |
Service ID for Mcu_GetPllStatus. |
MCU_SID_GET_RESET_REASON |
Service ID for Mcu_GetResetReason. |
MCU_SID_GET_RESET_RAW_VALUE |
Service ID for Mcu_GetResetRawValue. |
MCU_SID_PERFORM_RESET |
Service ID for Mcu_PerformReset. |
MCU_SID_SET_MODE |
Service ID for Mcu_SetMode. |
MCU_SID_GET_VERSION_INFO |
Service ID for Mcu_GetVersionInfo. |
MCU_SID_GET_RAM_STATE |
Service ID for Mcu_GetRamState. |
MCU_SID_GET_SYS_CLOCK |
Service ID for Mcu_GetSystemClock. |
MCU_SID_ASY_SELECT_INTERNAL_TEST_NODE |
Service ID for Mcu_ASysCtl_SelectInternalTestNode. |
MCU_SID_ASY_CONFIG_ADC_GLOBAL_SOC |
Service ID for Mcu_ASysCtl_ConfigADCGlobalSOC. |
MCU_SID_ASY_FORCE_ADC_GLOBAL_SOC |
Service ID for Mcu_ASysCtl_ForceADCGlobalSOC. |
MCU_SID_ASYSCTL_COMMIT_LOCK |
Service ID for Mcu_ASysCtl_CommitLock. |
MCU_SID_SYSCTL_CONFIG_EPWMXLINK |
Service ID for Mcu_SysCtl_ConfigEPWMXLink. |
MCU_E_PARAM_CONFIG |
Mcu_Init config param invalid. |
MCU_E_PARAM_CLOCK |
Mcu_InitClock clockid param invalid. |
MCU_E_PARAM_MODE |
Mcu_SetMode modeid param invalid. |
MCU_E_PARAM_RAMSECTION |
Mcu_InitRamSection ramSect param invalid. |
MCU_E_PLL_NOT_LOCKED |
PLL not locked. |
MCU_E_UNINIT |
API invoked without performing Mcu_Init. |
MCU_E_PARAM_POINTER |
NULL_PTR passed to MCU driver APIs. |
MCU_E_INIT_FAILED |
Mcu Initialization failed. |
MCU_E_UNINIT_CLOCK |
API invoked without performing Mcu_InitClock. |
MCU_E_PARAM_TESTNODE |
Invalid test node value passed to Mcu_ASysCtl_SelectInternalTestNode. |
MCU_E_ALREADY_LOCKED |
Error code: Mcu_ASysCtl_CommitLock() called with lock bits that are already committed. |
MCU_ERRORRST_MASK |
Define indicating invalid raw reset value. |
7.6.4. Functions
Return type |
Function Name |
Brief |
|---|---|---|
void |
Mcu_GetVersionInfo(Std_VersionInfoType * versioninfo) |
This service provides the version information of MCU module. |
void |
Mcu_Init(const Mcu_ConfigType * CfgPtr) |
This service initializes the MCU driver. |
Std_ReturnType |
Mcu_InitRamSection(Mcu_RamSectionType RamSection) |
This service initializes the RAM section wise with default values supplied in configuration set. |
Std_ReturnType |
Mcu_InitClock(Mcu_ClockType ClockSetting) |
This service initializes the PLL and other MCU specific clock options. |
Mcu_GetPllStatus(void ) |
This service provides the lock status of the PLL. |
|
uint32 |
Mcu_GetSystemClock(void ) |
This service provides the system clock. |
Mcu_GetResetReason(void ) |
The service reads the reset reason from the hardware. |
|
Mcu_GetResetRawValue(void ) |
The service reads the raw reset value from the hardware register. |
|
void |
Mcu_PerformReset(void ) |
The service performs a microcontroller reset. |
void |
Mcu_SetMode(Mcu_ModeType McuMode) |
The service activates low power modes. |
void |
Mcu_ASysCtl_SelectInternalTestNode(Mcu_ASysCtlTestNodeType TestNode) |
Selects the internal analog test node connected to the analog test bus. |
void |
Mcu_ASysCtl_ConfigADCGlobalSOC(uint32 BaseAddr, uint8 AdcSelect) |
Configures the ADC Global SOC Force Select register (ADCSOCFRCGBSEL). |
void |
Mcu_ASysCtl_ForceADCGlobalSOC(uint32 BaseAddr, uint32 SocMask) |
Forces the ADC Global SOC trigger register (ADCSOCFRCGB). |
void |
Mcu_SysCtl_ConfigEPWMXLink(uint32 EPWMXLinkMask) |
Configures the EPWM XLINK feature by writing the EPWMXLINKCFG register. |
void |
Mcu_ASysCtl_CommitLock(Mcu_ASysCtlLockType LockMask) |
Commits (locks) the specified ASysCtl registers. |
Mcu_GetRamState(void ) |
This service provides the actual status of the microcontroller Ram. |
7.6.4.1. function Mcu_GetVersionInfo
void Mcu_GetVersionInfo(
Std_VersionInfoType * versioninfo
)
Brief: This service provides the version information of MCU module.
Parameters:
versioninfo - Pointer to MCU driver version information.
Returns:
None
Return: None
Precondition: This API is available only if MCU_CFG_GET_VERSION_INFO_API is STD_ON
Postcondition: None
7.6.4.2. function Mcu_Init
void Mcu_Init(
const Mcu_ConfigType * CfgPtr
)
Brief: This service initializes the MCU driver.
This API is used to configure MCU settings for PLL and clock. This API is used to configure RAM section settings and Power mode settings.
Parameters:
CfgPtr - Pointer to MCU driver configuration set.
Returns:
None
Return: None
Precondition: None
Postcondition: None
7.6.4.3. function Mcu_InitRamSection
Std_ReturnType Mcu_InitRamSection(
Mcu_RamSectionType RamSection
)
Brief: This service initializes the RAM section wise with default values supplied in configuration set.
This service initializes the RAM section wise.
Parameters:
RamSection Selects RAM memory section provided in configuration set
Returns:
E_OK command has been accepted
E_NOT_OK command has not been accepted
Return: Std_ReturnType
Precondition: None
Postcondition: None
7.6.4.4. function Mcu_InitClock
Std_ReturnType Mcu_InitClock(
Mcu_ClockType ClockSetting
)
Brief: This service initializes the PLL and other MCU specific clock options.
This API is used to initializate clock & PLL This API is used to Set CPU timer clock, XCLKOUT, Ethercat clock, Peripheral clocks, MCAN module clocks
Parameters:
ClockSetting Selects clock section details provided in configuration set
Returns:
E_OK command has been accepted.
E_NOT_OK command has not been accepted
Return: Std_ReturnType
Precondition: This API is available only if MCU_CFG_INIT_CLOCK_API is STD_ON
Postcondition: None
7.6.4.5. function Mcu_GetPllStatus
Mcu_PllStatusType Mcu_GetPllStatus(
void
)
Brief: This service provides the lock status of the PLL.
Returns:
MCU_PLL_LOCKED PLL is in locked state. MCU_PLL_UNLOCKED: PLL is in unlocked state. MCU_PLL_STATUS_UNDEFINED: Pre-compile McuNoPll is set to true.
Return: Mcu_PllStatusType - PLL Status
Precondition: None
Postcondition: None
7.6.4.6. function Mcu_GetSystemClock
uint32 Mcu_GetSystemClock(
void
)
Brief: This service provides the system clock.
Returns:
PllSysclk
Return: Mcu_SysClk - System clock
Precondition: None
Postcondition: None
7.6.4.7. function Mcu_GetResetReason
Mcu_ResetType Mcu_GetResetReason(
void
)
Brief: The service reads the reset reason from the hardware.
This API reads the reset value from hardware and returns from the list of reset types defined in Mcu_ResetType.
Returns:
MCU_POWER_ON_RESET Power On reset
MCU_EXTERNAL_RESET External reset
MCU_ESM_NMI_WATCHDOG_RESET NMI Watchdog reset
MCU_WATCHDOG_RESET Watchdog reset
MCU_SW_RESET Simulation of external reset
MCU_ESM_RESET ESM reset
MCU_RESET_UNDEFINED UNDEFINED reset
Return: Mcu_ResetType - Reset Type
Precondition: None
Postcondition: None
7.6.4.8. function Mcu_GetResetRawValue
Mcu_RawResetType Mcu_GetResetRawValue(
void
)
Brief: The service reads the raw reset value from the hardware register.
This API reads the reset value from hardware and returns it.
Returns:
Reset raw value
Return: Mcu_RawResetType - Reset raw value
Precondition: None
Postcondition: None
7.6.4.9. function Mcu_PerformReset
void Mcu_PerformReset(
void
)
Brief: The service performs a microcontroller reset.
This API perform simulation of external reset only
Returns:
None
Return: None
Precondition: This API is available only if MCU_CFG_PERFORM_RESET_API is STD_ON
Postcondition: None
7.6.4.10. function Mcu_SetMode
void Mcu_SetMode(
Mcu_ModeType McuMode
)
Brief: The service activates low power modes.
This API is used to activate the low power modes IDLE & STANDBY
Parameters:
McuMode - ID to select one MCU mode setting from the list provided in configuration set
Returns:
None
Return: None
Precondition: None
Postcondition: None
7.6.4.11. function Mcu_ASysCtl_SelectInternalTestNode
void Mcu_ASysCtl_SelectInternalTestNode(
Mcu_ASysCtlTestNodeType TestNode
)
Brief: Selects the internal analog test node connected to the analog test bus.
This API is used to set the internal test node in ASysCtl
Parameters:
TestNode Test node selection value.
Returns:
None
Return: None
Precondition: Mcu_Init() must have been called.
Postcondition: INTERNALTESTCTL.TESTSEL reflects the requested node.
7.6.4.12. function Mcu_ASysCtl_ConfigADCGlobalSOC
void Mcu_ASysCtl_ConfigADCGlobalSOC(
uint32 BaseAddr,
uint8 AdcSelect
)
Brief: Configures the ADC Global SOC Force Select register (ADCSOCFRCGBSEL).
Writes ADCSOCFRCGBSEL at the given base address with the ADC instance select mask, selecting which ADC instances participate in the global software trigger.
Parameters:
BaseAddr Base address of the ADC global register block
AdcSelect ADC instance selection mask (e.g. ASYSCTL_ADCSOCFRCGBSEL_ADCA, etc.)
Returns:
None
Return: None
Note: This API is a general-purpose ASysCtl service and is available unconditionally (not gated by a feature-specific compile switch). It is intended to be called by any module that requires ADC global SOC instance selection (e.g. Cdd_Adc when CDD_ADC_GLBSW_TRIG_API is STD_ON).
Precondition: Mcu_Init() must have been called.
Postcondition: ADCSOCFRCGBSEL register written with AdcSelect.
7.6.4.13. function Mcu_ASysCtl_ForceADCGlobalSOC
void Mcu_ASysCtl_ForceADCGlobalSOC(
uint32 BaseAddr,
uint32 SocMask
)
Brief: Forces the ADC Global SOC trigger register (ADCSOCFRCGB).
Writes ADCSOCFRCGB at the given base address with the SOC mask to simultaneously trigger the selected SOCs across all ADC instances configured via ADCSOCFRCGBSEL.
Parameters:
BaseAddr Base address of the ADC global register block
SocMask SOC trigger mask (one bit per SOC to trigger)
Returns:
None
Return: None
Note: This API is a general-purpose ASysCtl service and is available unconditionally (not gated by a feature-specific compile switch). It is intended to be called by any module that requires ADC global SOC force triggering (e.g. Cdd_Adc when CDD_ADC_GLBSW_TRIG_API is STD_ON).
Precondition: Mcu_Init() must have been called.
Postcondition: ADCSOCFRCGB register written with SocMask.
7.6.4.14. function Mcu_SysCtl_ConfigEPWMXLink
void Mcu_SysCtl_ConfigEPWMXLink(
uint32 EPWMXLinkMask
)
Brief: Configures the EPWM XLINK feature by writing the EPWMXLINKCFG register.
Writes the EPWMXLINKCFG register at DEVCFG_BASE to enable the XLINK feature for the specified ePWM instances. Uses read-modify-write to set only the requested bits without affecting other instances.
The EPWMXLinkMask parameter is a bitwise OR of SYSCTL_EPWMXLINKCFG_EPWMn macros:
SYSCTL_EPWMXLINKCFG_EPWM1 (0x00001U) — Enable EPWM1 for XLINK
SYSCTL_EPWMXLINKCFG_EPWM2 (0x00002U) — Enable EPWM2 for XLINK
…
SYSCTL_EPWMXLINKCFG_EPWM18 (0x20000U) — Enable EPWM18 for XLINK
Parameters:
EPWMXLinkMask Bitmask of SYSCTL_EPWMXLINKCFG_EPWMn bits to enable
Returns:
None
Return: None
Note: This API is intended to be called by Cdd_Pwm when the XLINK feature is enabled for an ePWM instance. The register is at DEVCFG_BASE and is exclusively writable by CPU1.LINK2.
Precondition: Mcu_Init() must have been called.
Postcondition: EPWMXLINKCFG register OR-updated with EPWMXLinkMask.
7.6.4.15. function Mcu_ASysCtl_CommitLock
void Mcu_ASysCtl_CommitLock(
Mcu_ASysCtlLockType LockMask
)
Brief: Commits (locks) the specified ASysCtl registers.
This function applies the one-time write-lock to ASysCtl registers (ASYSCTL_O_LOCK) for the registers specified by LockMask. Lock bits are irreversible until system reset.
Values of Mcu_ASysCtlLockType can be OR-combined to lock multiple registers:
MCU_ASYSCTL_LOCK_TSNSCTL — Temperature Sensor Control
MCU_ASYSCTL_LOCK_ANAREFCTL — Analog Reference Control
MCU_ASYSCTL_LOCK_VMONCTL — Voltage Monitor Control
MCU_ASYSCTL_LOCK_CMPHPMXSEL — CMPSS HP positive mux (CMP1-CMP10)
MCU_ASYSCTL_LOCK_CMPLPMXSEL — CMPSS LP positive mux (CMP1-CMP10)
MCU_ASYSCTL_LOCK_CMPHNMXSEL — CMPSS HN negative mux
MCU_ASYSCTL_LOCK_CMPLNMXSEL — CMPSS LN negative mux
MCU_ASYSCTL_LOCK_VREGCTL — Voltage Regulator Control
MCU_ASYSCTL_LOCK_CMPHPMXSEL1 — CMPSS HP positive mux (CMP11-CMP12)
MCU_ASYSCTL_LOCK_CMPLPMXSEL1 — CMPSS LP positive mux (CMP11-CMP12)
Parameters:
LockMask Bitmask of Mcu_ASysCtlLockType values to lock
Returns:
None
Return: None
Precondition: Mcu_Init() must be called before calling this function.
Postcondition: Specified ASysCtl registers are locked until next system reset.
7.6.4.16. function Mcu_GetRamState
Mcu_RamStateType Mcu_GetRamState(
void
)
Brief: This service provides the actual status of the microcontroller Ram.
This API is not checking actual RAM status. So no actions are performed and returns RAM VALID
Returns:
MCU_RAMSTATE_INVALID Invalid Ram status
MCU_RAMSTATE_VALID Valid Ram status
Return: Mcu_RamStateType - Ram State Type
Precondition: This API is available only if MCU_CFG_GET_RAM_STATE_API is STD_ON
Postcondition: None